]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/if-let-typo.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / suggestions / if-let-typo.rs
CommitLineData
1b1a35ee
XL
1fn main() {
2 let foo = Some(0);
3 let bar = None;
4 if Some(x) = foo {} //~ ERROR cannot find value `x` in this scope
29967ef6 5 //~^ ERROR mismatched types
1b1a35ee
XL
6 if Some(foo) = bar {} //~ ERROR mismatched types
7 if 3 = foo {} //~ ERROR mismatched types
8 if Some(3) = foo {} //~ ERROR mismatched types
a2a8927a 9 //~^ ERROR invalid left-hand side of assignment
94222f64 10 if x = 5 {} //~ ERROR cannot find value `x` in this scope
1b1a35ee 11}