about summary refs log tree commit diff
path: root/src/test/compile-fail/liveness-and-init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/liveness-and-init.rs')
-rw-r--r--src/test/compile-fail/liveness-and-init.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/compile-fail/liveness-and-init.rs b/src/test/compile-fail/liveness-and-init.rs
new file mode 100644
index 00000000000..aea30e3465c
--- /dev/null
+++ b/src/test/compile-fail/liveness-and-init.rs
@@ -0,0 +1,6 @@
+fn main() {
+    let i: int;
+
+    log(debug, false && { i = 5; true });
+    log(debug, i); //! ERROR use of possibly uninitialized variable: `i`
+}