@@ -16,6 +16,12 @@ error[E0308]: mismatched types
16
16
LL | const X: usize = 42 && 39;
17
17
| ^^^^^^^^ expected `usize`, found `bool`
18
18
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
+
19
25
error[E0308]: mismatched types
20
26
--> $DIR/const-integer-bool-ops.rs:10:19
21
27
|
@@ -34,6 +40,12 @@ error[E0308]: mismatched types
34
40
LL | const X1: usize = 42 || 39;
35
41
| ^^^^^^^^ expected `usize`, found `bool`
36
42
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
+
37
49
error[E0308]: mismatched types
38
50
--> $DIR/const-integer-bool-ops.rs:19:19
39
51
|
@@ -52,6 +64,12 @@ error[E0308]: mismatched types
52
64
LL | const X2: usize = -42 || -39;
53
65
| ^^^^^^^^^^ expected `usize`, found `bool`
54
66
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
+
55
73
error[E0308]: mismatched types
56
74
--> $DIR/const-integer-bool-ops.rs:28:19
57
75
|
@@ -70,42 +88,84 @@ error[E0308]: mismatched types
70
88
LL | const X3: usize = -42 && -39;
71
89
| ^^^^^^^^^^ expected `usize`, found `bool`
72
90
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
+
73
97
error[E0308]: mismatched types
74
98
--> $DIR/const-integer-bool-ops.rs:37:18
75
99
|
76
100
LL | const Y: usize = 42.0 == 42.0;
77
101
| ^^^^^^^^^^^^ expected `usize`, found `bool`
78
102
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
+
79
109
error[E0308]: mismatched types
80
110
--> $DIR/const-integer-bool-ops.rs:42:19
81
111
|
82
112
LL | const Y1: usize = 42.0 >= 42.0;
83
113
| ^^^^^^^^^^^^ expected `usize`, found `bool`
84
114
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
+
85
121
error[E0308]: mismatched types
86
122
--> $DIR/const-integer-bool-ops.rs:47:19
87
123
|
88
124
LL | const Y2: usize = 42.0 <= 42.0;
89
125
| ^^^^^^^^^^^^ expected `usize`, found `bool`
90
126
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
+
91
133
error[E0308]: mismatched types
92
134
--> $DIR/const-integer-bool-ops.rs:52:19
93
135
|
94
136
LL | const Y3: usize = 42.0 > 42.0;
95
137
| ^^^^^^^^^^^ expected `usize`, found `bool`
96
138
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
+
97
145
error[E0308]: mismatched types
98
146
--> $DIR/const-integer-bool-ops.rs:57:19
99
147
|
100
148
LL | const Y4: usize = 42.0 < 42.0;
101
149
| ^^^^^^^^^^^ expected `usize`, found `bool`
102
150
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
+
103
157
error[E0308]: mismatched types
104
158
--> $DIR/const-integer-bool-ops.rs:62:19
105
159
|
106
160
LL | const Y5: usize = 42.0 != 42.0;
107
161
| ^^^^^^^^^^^^ expected `usize`, found `bool`
108
162
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
+
109
169
error: aborting due to 18 previous errors
110
170
111
171
For more information about this error, try `rustc --explain E0308`.
0 commit comments