rust/tests/ui/generic-const-items/trivially-unsatisfied-bound...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
341 B
Rust
Raw Normal View History

2023-07-10 09:10:03 +08:00
#![feature(generic_const_items, trivial_bounds)]
#![allow(incomplete_features)]
// Ensure that we check if trivial bounds on const items hold or not.
const UNUSABLE: () = () //~ ERROR evaluation of constant value failed
2023-07-10 09:10:03 +08:00
where
String: Copy;
fn main() {
let _ = UNUSABLE; //~ ERROR the trait bound `String: Copy` is not satisfied
}