2022-11-11 14:22:47 -06:00
|
|
|
fn test() {
|
|
|
|
if let 123 = 123 { println!("yes"); }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn test_2() {
|
|
|
|
let 1x = 123;
|
2023-03-07 04:01:26 -06:00
|
|
|
//~^ ERROR expected identifier, found `1x`
|
2022-11-11 14:22:47 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn test_3() {
|
|
|
|
let 2x: i32 = 123;
|
2023-03-07 04:01:26 -06:00
|
|
|
//~^ ERROR expected identifier, found `2x`
|
2022-11-11 14:22:47 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn test_4() {
|
|
|
|
if let 2e1 = 123 {
|
|
|
|
//~^ ERROR mismatched types
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn test_5() {
|
|
|
|
let 23name = 123;
|
2023-03-07 04:01:26 -06:00
|
|
|
//~^ ERROR expected identifier, found `23name`
|
2022-11-11 14:22:47 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|