1 // gate-test-if_let_guard
8 //~^ ERROR `if let` guard is not implemented
10 () if (let 0 = 1) => {}
11 //~^ ERROR `let` expressions in this position are experimental
12 //~| ERROR `let` expressions are not supported here
14 () if (((let 0 = 1))) => {}
15 //~^ ERROR `let` expressions in this position are experimental
16 //~| ERROR `let` expressions are not supported here
18 () if true && let 0 = 1 => {}
19 //~^ ERROR `let` expressions in this position are experimental
20 //~| ERROR `let` expressions are not supported here
22 () if let 0 = 1 && true => {}
23 //~^ ERROR `let` expressions in this position are experimental
24 //~| ERROR `let` expressions are not supported here
26 () if (let 0 = 1) && true => {}
27 //~^ ERROR `let` expressions in this position are experimental
28 //~| ERROR `let` expressions are not supported here
30 () if true && (let 0 = 1) => {}
31 //~^ ERROR `let` expressions in this position are experimental
32 //~| ERROR `let` expressions are not supported here
34 () if (let 0 = 1) && (let 0 = 1) => {}
35 //~^ ERROR `let` expressions in this position are experimental
36 //~| ERROR `let` expressions in this position are experimental
37 //~| ERROR `let` expressions are not supported here
38 //~| ERROR `let` expressions are not supported here
40 () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
41 //~^ ERROR `let` expressions in this position are experimental
42 //~| ERROR `let` expressions in this position are experimental
43 //~| ERROR `let` expressions in this position are experimental
44 //~| ERROR `let` expressions in this position are experimental
45 //~| ERROR `let` expressions in this position are experimental
46 //~| ERROR `let` expressions are not supported here
47 //~| ERROR `let` expressions are not supported here
48 //~| ERROR `let` expressions are not supported here
49 //~| ERROR `let` expressions are not supported here
50 //~| ERROR `let` expressions are not supported here
52 () if let Range { start: _, end: _ } = (true..true) && false => {}
53 //~^ ERROR `let` expressions in this position are experimental
54 //~| ERROR `let` expressions are not supported here
60 macro_rules! use_expr {
68 use_expr!((let 0 = 1 && 0 == 0));
69 //~^ ERROR `let` expressions in this position are experimental
70 //~| ERROR `let` expressions are not supported here
71 use_expr!((let 0 = 1));
72 //~^ ERROR `let` expressions in this position are experimental
73 //~| ERROR `let` expressions are not supported here
77 //~^ ERROR `if let` guard is not implemented
81 //~^ ERROR no rules expected the token `let`