diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs new file mode 100644 index 000000000..dd00b327d --- /dev/null +++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs @@ -0,0 +1,12 @@ +#![feature(generic_const_items, trivial_bounds)] +#![allow(incomplete_features)] + +// Ensure that we check if trivial bounds on const items hold or not. + +const UNUSABLE: () = () +where + String: Copy; + +fn main() { + let _ = UNUSABLE; //~ ERROR the trait bound `String: Copy` is not satisfied +} |