diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-10291.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-10291.rs b/src/test/ui/issues/issue-10291.rs new file mode 100644 index 000000000..31b9e1240 --- /dev/null +++ b/src/test/ui/issues/issue-10291.rs @@ -0,0 +1,8 @@ +fn test<'x>(x: &'x isize) { + drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { + x + //~^ ERROR lifetime may not live long enough + })); +} + +fn main() {} |