@@ -11,17 +11,63 @@ fn main() {
11
11
&& x
12
12
{
13
13
x;
14
+ } else {
15
+ x; //~ ERROR cannot find value `x` in this scope
14
16
}
15
17
x; //~ ERROR cannot find value `x` in this scope
16
18
17
19
// Elsewhere, `is`'s bindings only extend to the end of its `&&`-chain.
18
20
if x //~ ERROR cannot find value `x` in this scope
19
- && ( is ! ( true is x) && x)
21
+ && ( is ! ( true is x) && x && { x } )
20
22
&& x //~ ERROR cannot find value `x` in this scope
21
23
&& ( is ! ( true is x) || x) //~ ERROR cannot find value `x` in this scope
24
+ && ( !is ! ( true is x) || x) //~ ERROR cannot find value `x` in this scope
25
+ && ( is ! ( true is x) & x) //~ ERROR cannot find value `x` in this scope
22
26
{
23
27
x; //~ ERROR cannot find value `x` in this scope
24
28
}
29
+
30
+ match is ! ( true is x) {
31
+ _ => { x; } //~ ERROR cannot find value `x` in this scope
32
+ }
33
+
34
+ match ( ) {
35
+ ( ) if is ! ( true is x) && x => { x; }
36
+ ( ) if x => { } //~ ERROR cannot find value `x` in this scope
37
+ }
38
+
39
+ match ( ) {
40
+ ( ) if is ! ( true is x) && x => { x; }
41
+ ( ) => { x; } //~ ERROR cannot find value `x` in this scope
42
+ }
43
+
44
+ fn f ( _a : bool , _b : bool ) { }
45
+ f ( is ! ( true is x) && x, true ) ;
46
+ f ( is ! ( true is x) , x) ; //~ ERROR cannot find value `x` in this scope
47
+ f ( is ! ( true is x) && x, x) ; //~ ERROR cannot find value `x` in this scope
48
+
49
+ if !is ! ( true is x) {
50
+ x; //~ ERROR cannot find value `x` in this scope
51
+ } else {
52
+ x; //~ ERROR cannot find value `x` in this scope
53
+ }
54
+
55
+ if true
56
+ && if is ! ( true is x) && x { x } else { false }
57
+ && x //~ ERROR cannot find value `x` in this scope
58
+ {
59
+ x; //~ ERROR cannot find value `x` in this scope
60
+ }
61
+
62
+ while is ! ( true is x) {
63
+ x;
64
+ break ;
65
+ }
66
+ x; //~ ERROR cannot find value `x` in this scope
67
+
68
+ true is x;
69
+ x; //~ ERROR cannot find value `x` in this scope
70
+
25
71
is ! ( true is x) ;
26
72
x; //~ ERROR cannot find value `x` in this scope
27
73
}
0 commit comments