diff options
Diffstat (limited to 'tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs')
-rw-r--r-- | tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs new file mode 100644 index 000000000..9243deac8 --- /dev/null +++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs @@ -0,0 +1,12 @@ +#![feature(generic_const_items, trivial_bounds)] +#![allow(incomplete_features, dead_code, trivial_bounds)] + +// FIXME(generic_const_items): This looks like a bug to me. I expected that we wouldn't emit any +// errors. I thought we'd skip the evaluation of consts whose bounds don't hold. + +const UNUSED: () = () +where + String: Copy; +//~^^^ ERROR evaluation of constant value failed + +fn main() {} |