diff options
Diffstat (limited to 'src/test/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs')
-rw-r--r-- | src/test/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs b/src/test/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs deleted file mode 100644 index 95847d8d3..000000000 --- a/src/test/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs +++ /dev/null @@ -1,14 +0,0 @@ -fn foo1(s: &str) -> impl Iterator<Item = String> + '_ { - None.into_iter() - .flat_map(move |()| s.chars().map(|c| format!("{}{}", c, s))) - //~^ ERROR captured variable cannot escape `FnMut` closure body - //~| HELP consider adding 'move' keyword before the nested closure -} - -fn foo2(s: &str) -> impl Sized + '_ { - move |()| s.chars().map(|c| format!("{}{}", c, s)) - //~^ ERROR lifetime may not live long enough - //~| HELP consider adding 'move' keyword before the nested closure -} - -fn main() {} |