diff options
Diffstat (limited to 'src/test/ui/regions/regions-proc-bound-capture.rs')
-rw-r--r-- | src/test/ui/regions/regions-proc-bound-capture.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/test/ui/regions/regions-proc-bound-capture.rs b/src/test/ui/regions/regions-proc-bound-capture.rs deleted file mode 100644 index f79d9dc90..000000000 --- a/src/test/ui/regions/regions-proc-bound-capture.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn borrowed_proc<'a>(x: &'a isize) -> Box<dyn FnMut()->(isize) + 'a> { - // This is legal, because the region bound on `proc` - // states that it captures `x`. - Box::new(move|| { *x }) -} - -fn static_proc(x: &isize) -> Box<dyn FnMut() -> (isize) + 'static> { - // This is illegal, because the region bound on `proc` is 'static. - Box::new(move || { *x }) - //~^ ERROR lifetime may not live long enough -} - -fn main() { } |