diff options
Diffstat (limited to 'tests/ui/consts/escaping-bound-var.rs')
-rw-r--r-- | tests/ui/consts/escaping-bound-var.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/consts/escaping-bound-var.rs b/tests/ui/consts/escaping-bound-var.rs new file mode 100644 index 000000000..7c1fbd24f --- /dev/null +++ b/tests/ui/consts/escaping-bound-var.rs @@ -0,0 +1,13 @@ +#![feature(generic_const_exprs)] +//~^ WARN the feature `generic_const_exprs` is incomplete + +fn test<'a>( + _: &'a (), +) -> [(); { + let x: &'a (); + //~^ ERROR cannot capture late-bound lifetime in constant + 1 +}] { +} + +fn main() {} |