Skip to content

Commit 70c1cf1

Browse files
committed
32bit bless
1 parent 8af76cb commit 70c1cf1

File tree

2 files changed

+28
-38
lines changed

2 files changed

+28
-38
lines changed

src/test/ui/consts/miri_unleashed/const_refers_to_static2.32bit.stderr

+4-8
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: it is undefined behavior to use this value
33
|
44
LL | / const REF_INTERIOR_MUT: &usize = {
55
LL | |
6-
LL | |
7-
LL | |
86
LL | | static FOO: AtomicUsize = AtomicUsize::new(0);
97
LL | | unsafe { &*(&FOO as *const _ as *const usize) }
108
LL | | };
@@ -16,12 +14,10 @@ LL | | };
1614
}
1715

1816
error[E0080]: it is undefined behavior to use this value
19-
--> $DIR/const_refers_to_static2.rs:20:1
17+
--> $DIR/const_refers_to_static2.rs:18:1
2018
|
2119
LL | / const READ_IMMUT: &usize = {
2220
LL | |
23-
LL | |
24-
LL | |
2521
LL | | static FOO: usize = 0;
2622
LL | | &FOO
2723
LL | | };
@@ -35,17 +31,17 @@ LL | | };
3531
warning: skipping const checks
3632
|
3733
help: skipping check that does not even have a feature gate
38-
--> $DIR/const_refers_to_static2.rs:16:18
34+
--> $DIR/const_refers_to_static2.rs:14:18
3935
|
4036
LL | unsafe { &*(&FOO as *const _ as *const usize) }
4137
| ^^^
4238
help: skipping check for `const_raw_ptr_deref` feature
43-
--> $DIR/const_refers_to_static2.rs:16:14
39+
--> $DIR/const_refers_to_static2.rs:14:14
4440
|
4541
LL | unsafe { &*(&FOO as *const _ as *const usize) }
4642
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4743
help: skipping check that does not even have a feature gate
48-
--> $DIR/const_refers_to_static2.rs:25:6
44+
--> $DIR/const_refers_to_static2.rs:21:6
4945
|
5046
LL | &FOO
5147
| ^^^

src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr

+24-30
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0080]: it is undefined behavior to use this value
33
|
44
LL | / const SLICE_MUT: &[u8; 1] = {
55
LL | |
6-
LL | |
7-
LL | |
86
LL | | unsafe { &static_cross_crate::ZERO }
97
LL | | };
108
| |__^ type validation failed: encountered a reference pointing to a static variable
@@ -15,18 +13,16 @@ LL | | };
1513
}
1614

1715
error: could not evaluate constant pattern
18-
--> $DIR/const_refers_to_static_cross_crate.rs:47:9
16+
--> $DIR/const_refers_to_static_cross_crate.rs:40:9
1917
|
2018
LL | SLICE_MUT => true,
2119
| ^^^^^^^^^
2220

2321
error[E0080]: it is undefined behavior to use this value
24-
--> $DIR/const_refers_to_static_cross_crate.rs:19:1
22+
--> $DIR/const_refers_to_static_cross_crate.rs:17:1
2523
|
2624
LL | / const U8_MUT: &u8 = {
2725
LL | |
28-
LL | |
29-
LL | |
3026
LL | | unsafe { &static_cross_crate::ZERO[0] }
3127
LL | | };
3228
| |__^ type validation failed: encountered a reference pointing to a static variable
@@ -37,143 +33,141 @@ LL | | };
3733
}
3834

3935
error: could not evaluate constant pattern
40-
--> $DIR/const_refers_to_static_cross_crate.rs:56:9
36+
--> $DIR/const_refers_to_static_cross_crate.rs:49:9
4137
|
4238
LL | U8_MUT => true,
4339
| ^^^^^^
4440

4541
warning: any use of this value will cause an error
46-
--> $DIR/const_refers_to_static_cross_crate.rs:29:15
42+
--> $DIR/const_refers_to_static_cross_crate.rs:25:15
4743
|
4844
LL | / const U8_MUT2: &u8 = {
4945
LL | | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
5046
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
5147
LL | |
5248
LL | |
5349
LL | |
54-
LL | |
5550
LL | | };
5651
| |__-
5752
|
5853
note: the lint level is defined here
59-
--> $DIR/const_refers_to_static_cross_crate.rs:27:8
54+
--> $DIR/const_refers_to_static_cross_crate.rs:23:8
6055
|
6156
LL | #[warn(const_err)]
6257
| ^^^^^^^^^
6358
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
6459
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
6560

6661
error: could not evaluate constant pattern
67-
--> $DIR/const_refers_to_static_cross_crate.rs:67:9
62+
--> $DIR/const_refers_to_static_cross_crate.rs:60:9
6863
|
6964
LL | U8_MUT2 => true,
7065
| ^^^^^^^
7166

7267
warning: any use of this value will cause an error
73-
--> $DIR/const_refers_to_static_cross_crate.rs:37:51
68+
--> $DIR/const_refers_to_static_cross_crate.rs:32:51
7469
|
7570
LL | / const U8_MUT3: &u8 = {
7671
LL | | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
7772
| | ^^^^^^^^^^^ constant accesses static
7873
LL | |
7974
LL | |
80-
... |
8175
LL | |
8276
LL | | };
8377
| |__-
8478
|
8579
note: the lint level is defined here
86-
--> $DIR/const_refers_to_static_cross_crate.rs:35:8
80+
--> $DIR/const_refers_to_static_cross_crate.rs:30:8
8781
|
8882
LL | #[warn(const_err)]
8983
| ^^^^^^^^^
9084
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9185
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
9286

9387
error: could not evaluate constant pattern
94-
--> $DIR/const_refers_to_static_cross_crate.rs:75:9
88+
--> $DIR/const_refers_to_static_cross_crate.rs:68:9
9589
|
9690
LL | U8_MUT3 => true,
9791
| ^^^^^^^
9892

9993
error: could not evaluate constant pattern
100-
--> $DIR/const_refers_to_static_cross_crate.rs:47:9
94+
--> $DIR/const_refers_to_static_cross_crate.rs:40:9
10195
|
10296
LL | SLICE_MUT => true,
10397
| ^^^^^^^^^
10498

10599
error: could not evaluate constant pattern
106-
--> $DIR/const_refers_to_static_cross_crate.rs:56:9
100+
--> $DIR/const_refers_to_static_cross_crate.rs:49:9
107101
|
108102
LL | U8_MUT => true,
109103
| ^^^^^^
110104

111105
error: could not evaluate constant pattern
112-
--> $DIR/const_refers_to_static_cross_crate.rs:67:9
106+
--> $DIR/const_refers_to_static_cross_crate.rs:60:9
113107
|
114108
LL | U8_MUT2 => true,
115109
| ^^^^^^^
116110

117111
error: could not evaluate constant pattern
118-
--> $DIR/const_refers_to_static_cross_crate.rs:75:9
112+
--> $DIR/const_refers_to_static_cross_crate.rs:68:9
119113
|
120114
LL | U8_MUT3 => true,
121115
| ^^^^^^^
122116

123117
warning: skipping const checks
124118
|
125119
help: skipping check that does not even have a feature gate
126-
--> $DIR/const_refers_to_static_cross_crate.rs:16:15
120+
--> $DIR/const_refers_to_static_cross_crate.rs:14:15
127121
|
128122
LL | unsafe { &static_cross_crate::ZERO }
129123
| ^^^^^^^^^^^^^^^^^^^^^^^^
130124
help: skipping check that does not even have a feature gate
131-
--> $DIR/const_refers_to_static_cross_crate.rs:16:15
125+
--> $DIR/const_refers_to_static_cross_crate.rs:14:15
132126
|
133127
LL | unsafe { &static_cross_crate::ZERO }
134128
| ^^^^^^^^^^^^^^^^^^^^^^^^
135129
help: skipping check that does not even have a feature gate
136-
--> $DIR/const_refers_to_static_cross_crate.rs:23:15
130+
--> $DIR/const_refers_to_static_cross_crate.rs:19:15
137131
|
138132
LL | unsafe { &static_cross_crate::ZERO[0] }
139133
| ^^^^^^^^^^^^^^^^^^^^^^^^
140134
help: skipping check that does not even have a feature gate
141-
--> $DIR/const_refers_to_static_cross_crate.rs:23:15
135+
--> $DIR/const_refers_to_static_cross_crate.rs:19:15
142136
|
143137
LL | unsafe { &static_cross_crate::ZERO[0] }
144138
| ^^^^^^^^^^^^^^^^^^^^^^^^
145139
help: skipping check that does not even have a feature gate
146-
--> $DIR/const_refers_to_static_cross_crate.rs:23:15
140+
--> $DIR/const_refers_to_static_cross_crate.rs:19:15
147141
|
148142
LL | unsafe { &static_cross_crate::ZERO[0] }
149143
| ^^^^^^^^^^^^^^^^^^^^^^^^
150144
help: skipping check that does not even have a feature gate
151-
--> $DIR/const_refers_to_static_cross_crate.rs:29:17
145+
--> $DIR/const_refers_to_static_cross_crate.rs:25:17
152146
|
153147
LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
154148
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
155149
help: skipping check that does not even have a feature gate
156-
--> $DIR/const_refers_to_static_cross_crate.rs:37:20
150+
--> $DIR/const_refers_to_static_cross_crate.rs:32:20
157151
|
158152
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
159153
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160154
help: skipping check that does not even have a feature gate
161-
--> $DIR/const_refers_to_static_cross_crate.rs:37:20
155+
--> $DIR/const_refers_to_static_cross_crate.rs:32:20
162156
|
163157
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
164158
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165159
help: skipping check that does not even have a feature gate
166-
--> $DIR/const_refers_to_static_cross_crate.rs:37:20
160+
--> $DIR/const_refers_to_static_cross_crate.rs:32:20
167161
|
168162
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
169163
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170164
help: skipping check for `const_panic` feature
171-
--> $DIR/const_refers_to_static_cross_crate.rs:37:77
165+
--> $DIR/const_refers_to_static_cross_crate.rs:32:77
172166
|
173167
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
174168
| ^^^^^^^^
175169
help: skipping check that does not even have a feature gate
176-
--> $DIR/const_refers_to_static_cross_crate.rs:37:20
170+
--> $DIR/const_refers_to_static_cross_crate.rs:32:20
177171
|
178172
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
179173
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)