1 // gate-test-if_let_guard
8 //~^ ERROR `if let` guard is not implemented
9 //~| ERROR `let` expressions are not supported here
11 () if (let 0 = 1) => {}
12 //~^ ERROR `let` expressions in this position are experimental
13 //~| ERROR `let` expressions are not supported here
15 () if (((let 0 = 1))) => {}
16 //~^ ERROR `let` expressions in this position are experimental
17 //~| ERROR `let` expressions are not supported here
19 () if true && let 0 = 1 => {}
20 //~^ ERROR `let` expressions in this position are experimental
21 //~| ERROR `let` expressions are not supported here
23 () if let 0 = 1 && true => {}
24 //~^ ERROR `let` expressions in this position are experimental
25 //~| ERROR `let` expressions are not supported here
27 () if (let 0 = 1) && true => {}
28 //~^ ERROR `let` expressions in this position are experimental
29 //~| ERROR `let` expressions are not supported here
31 () if true && (let 0 = 1) => {}
32 //~^ ERROR `let` expressions in this position are experimental
33 //~| ERROR `let` expressions are not supported here
35 () if (let 0 = 1) && (let 0 = 1) => {}
36 //~^ ERROR `let` expressions in this position are experimental
37 //~| ERROR `let` expressions in this position are experimental
38 //~| ERROR `let` expressions are not supported here
39 //~| ERROR `let` expressions are not supported here
41 () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
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 in this position are experimental
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
51 //~| ERROR `let` expressions are not supported here
53 () if let Range { start: _, end: _ } = (true..true) && false => {}
54 //~^ ERROR `let` expressions in this position are experimental
55 //~| ERROR `let` expressions are not supported here
61 macro_rules! use_expr {
69 use_expr!((let 0 = 1 && 0 == 0));
70 //~^ ERROR `let` expressions in this position are experimental
71 //~| ERROR `let` expressions are not supported here
72 use_expr!((let 0 = 1));
73 //~^ ERROR `let` expressions in this position are experimental
74 //~| ERROR `let` expressions are not supported here
78 //~^ ERROR `if let` guard is not implemented
82 //~^ ERROR no rules expected the token `let`