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