diff options
Diffstat (limited to 'tests/ui/nll/issue-53040.rs')
-rw-r--r-- | tests/ui/nll/issue-53040.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/nll/issue-53040.rs b/tests/ui/nll/issue-53040.rs new file mode 100644 index 000000000..e4ee6e913 --- /dev/null +++ b/tests/ui/nll/issue-53040.rs @@ -0,0 +1,5 @@ +fn main() { + let mut v: Vec<()> = Vec::new(); + || &mut v; +//~^ ERROR captured variable cannot escape `FnMut` closure body +} |