diff options
Diffstat (limited to 'src/test/ui/let-else/let-else-scope.rs')
-rw-r--r-- | src/test/ui/let-else/let-else-scope.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/let-else/let-else-scope.rs b/src/test/ui/let-else/let-else-scope.rs new file mode 100644 index 000000000..f17682db4 --- /dev/null +++ b/src/test/ui/let-else/let-else-scope.rs @@ -0,0 +1,7 @@ +#![feature(let_else)] + +fn main() { + let Some(x) = Some(2) else { + panic!("{}", x); //~ ERROR cannot find value `x` in this scope + }; +} |