diff options
Diffstat (limited to 'src/test/compile-fail/liveness-block-unint.rs')
| -rw-r--r-- | src/test/compile-fail/liveness-block-unint.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/compile-fail/liveness-block-unint.rs b/src/test/compile-fail/liveness-block-unint.rs new file mode 100644 index 00000000000..698f9f7cf79 --- /dev/null +++ b/src/test/compile-fail/liveness-block-unint.rs @@ -0,0 +1,7 @@ +fn force(f: fn()) { f(); } +fn main() { + let x: int; + force(fn&() { + log(debug, x); //! ERROR capture of possibly uninitialized variable: `x` + }); +} |
