diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/generic-const-items/reference-outlives-referent.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/generic-const-items/reference-outlives-referent.rs b/tests/ui/generic-const-items/reference-outlives-referent.rs new file mode 100644 index 000000000..13e4eaac3 --- /dev/null +++ b/tests/ui/generic-const-items/reference-outlives-referent.rs @@ -0,0 +1,9 @@ +// Test that we catch that the reference outlives the referent and we +// successfully emit a diagnostic. Regression test for issue #114714. + +#![feature(generic_const_items)] +#![allow(incomplete_features)] + +const Q<'a, 'b>: &'a &'b () = &&(); //~ ERROR reference has a longer lifetime than the data it references + +fn main() {} |