diff options
Diffstat (limited to 'src/test/compile-fail/issue-10291.rs')
| -rw-r--r-- | src/test/compile-fail/issue-10291.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/compile-fail/issue-10291.rs b/src/test/compile-fail/issue-10291.rs index 45f6e55914a..9711d760ae6 100644 --- a/src/test/compile-fail/issue-10291.rs +++ b/src/test/compile-fail/issue-10291.rs @@ -8,13 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(box_syntax)] - fn test<'x>(x: &'x isize) { - drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(box |z| { + // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. + drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { x //~^ ERROR cannot infer an appropriate lifetime - }); + })); } fn main() {} |
