@@ -16,6 +16,12 @@ error[E0308]: mismatched types
1616LL | const X: usize = 42 && 39;
1717 | ^^^^^^^^ expected `usize`, found `bool`
1818
19+ note: erroneous constant encountered
20+ --> $DIR/const-integer-bool-ops.rs:8:18
21+ |
22+ LL | const ARR: [i32; X] = [99; 34];
23+ | ^
24+
1925error[E0308]: mismatched types
2026 --> $DIR/const-integer-bool-ops.rs:10:19
2127 |
@@ -34,6 +40,12 @@ error[E0308]: mismatched types
3440LL | const X1: usize = 42 || 39;
3541 | ^^^^^^^^ expected `usize`, found `bool`
3642
43+ note: erroneous constant encountered
44+ --> $DIR/const-integer-bool-ops.rs:17:19
45+ |
46+ LL | const ARR1: [i32; X1] = [99; 47];
47+ | ^^
48+
3749error[E0308]: mismatched types
3850 --> $DIR/const-integer-bool-ops.rs:19:19
3951 |
@@ -52,6 +64,12 @@ error[E0308]: mismatched types
5264LL | const X2: usize = -42 || -39;
5365 | ^^^^^^^^^^ expected `usize`, found `bool`
5466
67+ note: erroneous constant encountered
68+ --> $DIR/const-integer-bool-ops.rs:26:19
69+ |
70+ LL | const ARR2: [i32; X2] = [99; 18446744073709551607];
71+ | ^^
72+
5573error[E0308]: mismatched types
5674 --> $DIR/const-integer-bool-ops.rs:28:19
5775 |
@@ -70,42 +88,84 @@ error[E0308]: mismatched types
7088LL | const X3: usize = -42 && -39;
7189 | ^^^^^^^^^^ expected `usize`, found `bool`
7290
91+ note: erroneous constant encountered
92+ --> $DIR/const-integer-bool-ops.rs:35:19
93+ |
94+ LL | const ARR3: [i32; X3] = [99; 6];
95+ | ^^
96+
7397error[E0308]: mismatched types
7498 --> $DIR/const-integer-bool-ops.rs:37:18
7599 |
76100LL | const Y: usize = 42.0 == 42.0;
77101 | ^^^^^^^^^^^^ expected `usize`, found `bool`
78102
103+ note: erroneous constant encountered
104+ --> $DIR/const-integer-bool-ops.rs:40:19
105+ |
106+ LL | const ARRR: [i32; Y] = [99; 1];
107+ | ^
108+
79109error[E0308]: mismatched types
80110 --> $DIR/const-integer-bool-ops.rs:42:19
81111 |
82112LL | const Y1: usize = 42.0 >= 42.0;
83113 | ^^^^^^^^^^^^ expected `usize`, found `bool`
84114
115+ note: erroneous constant encountered
116+ --> $DIR/const-integer-bool-ops.rs:45:20
117+ |
118+ LL | const ARRR1: [i32; Y1] = [99; 1];
119+ | ^^
120+
85121error[E0308]: mismatched types
86122 --> $DIR/const-integer-bool-ops.rs:47:19
87123 |
88124LL | const Y2: usize = 42.0 <= 42.0;
89125 | ^^^^^^^^^^^^ expected `usize`, found `bool`
90126
127+ note: erroneous constant encountered
128+ --> $DIR/const-integer-bool-ops.rs:50:20
129+ |
130+ LL | const ARRR2: [i32; Y2] = [99; 1];
131+ | ^^
132+
91133error[E0308]: mismatched types
92134 --> $DIR/const-integer-bool-ops.rs:52:19
93135 |
94136LL | const Y3: usize = 42.0 > 42.0;
95137 | ^^^^^^^^^^^ expected `usize`, found `bool`
96138
139+ note: erroneous constant encountered
140+ --> $DIR/const-integer-bool-ops.rs:55:20
141+ |
142+ LL | const ARRR3: [i32; Y3] = [99; 0];
143+ | ^^
144+
97145error[E0308]: mismatched types
98146 --> $DIR/const-integer-bool-ops.rs:57:19
99147 |
100148LL | const Y4: usize = 42.0 < 42.0;
101149 | ^^^^^^^^^^^ expected `usize`, found `bool`
102150
151+ note: erroneous constant encountered
152+ --> $DIR/const-integer-bool-ops.rs:60:20
153+ |
154+ LL | const ARRR4: [i32; Y4] = [99; 0];
155+ | ^^
156+
103157error[E0308]: mismatched types
104158 --> $DIR/const-integer-bool-ops.rs:62:19
105159 |
106160LL | const Y5: usize = 42.0 != 42.0;
107161 | ^^^^^^^^^^^^ expected `usize`, found `bool`
108162
163+ note: erroneous constant encountered
164+ --> $DIR/const-integer-bool-ops.rs:65:20
165+ |
166+ LL | const ARRR5: [i32; Y5] = [99; 0];
167+ | ^^
168+
109169error: aborting due to 18 previous errors
110170
111171For more information about this error, try `rustc --explain E0308`.
0 commit comments