diff options
Diffstat (limited to 'tests/ui/capture1.rs')
-rw-r--r-- | tests/ui/capture1.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/capture1.rs b/tests/ui/capture1.rs new file mode 100644 index 000000000..2938c0845 --- /dev/null +++ b/tests/ui/capture1.rs @@ -0,0 +1,6 @@ +// error-pattern: can't capture dynamic environment in a fn item + +fn main() { + let bar: isize = 5; + fn foo() -> isize { return bar; } +} |