diff options
Diffstat (limited to 'src/test/compile-fail/bad-env-capture.rs')
| -rw-r--r-- | src/test/compile-fail/bad-env-capture.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/compile-fail/bad-env-capture.rs b/src/test/compile-fail/bad-env-capture.rs new file mode 100644 index 00000000..013bb56e --- /dev/null +++ b/src/test/compile-fail/bad-env-capture.rs @@ -0,0 +1,10 @@ +// error-pattern: attempted dynamic environment-capture +fn foo() { + let int x; + fn bar() { + log x; + } +} +fn main() { + foo(); +}
\ No newline at end of file |