diff options
Diffstat (limited to 'tests/ui/borrowck/borrowck-and-init.rs')
-rw-r--r-- | tests/ui/borrowck/borrowck-and-init.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-and-init.rs b/tests/ui/borrowck/borrowck-and-init.rs new file mode 100644 index 000000000..eeb4f05d6 --- /dev/null +++ b/tests/ui/borrowck/borrowck-and-init.rs @@ -0,0 +1,6 @@ +fn main() { + let i: isize; + + println!("{}", false && { i = 5; true }); + println!("{}", i); //~ ERROR E0381 +} |