|
1 | 1 | warning: skipping const checks
|
2 |
| - --> $DIR/const_refers_to_static.rs:13:5 |
| 2 | + --> $DIR/const_refers_to_static.rs:11:1 |
3 | 3 | |
|
4 |
| -LL | FOO.fetch_add(1, Ordering::Relaxed) |
5 |
| - | ^^^ |
| 4 | +LL | / const MUTATE_INTERIOR_MUT: usize = { |
| 5 | +LL | | |
| 6 | +LL | | static FOO: AtomicUsize = AtomicUsize::new(0); |
| 7 | +LL | | FOO.fetch_add(1, Ordering::Relaxed) |
| 8 | +LL | | }; |
| 9 | + | |__^ |
6 | 10 |
|
7 | 11 | warning: skipping const checks
|
8 |
| - --> $DIR/const_refers_to_static.rs:13:5 |
| 12 | + --> $DIR/const_refers_to_static.rs:17:1 |
9 | 13 | |
|
10 |
| -LL | FOO.fetch_add(1, Ordering::Relaxed) |
11 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 14 | +LL | / const READ_INTERIOR_MUT: usize = { |
| 15 | +LL | | |
| 16 | +LL | | static FOO: AtomicUsize = AtomicUsize::new(0); |
| 17 | +LL | | unsafe { *(&FOO as *const _ as *const usize) } |
| 18 | +LL | | }; |
| 19 | + | |__^ |
12 | 20 |
|
13 | 21 | warning: skipping const checks
|
14 |
| - --> $DIR/const_refers_to_static.rs:20:17 |
15 |
| - | |
16 |
| -LL | unsafe { *(&FOO as *const _ as *const usize) } |
17 |
| - | ^^^ |
18 |
| - |
19 |
| -warning: skipping const checks |
20 |
| - --> $DIR/const_refers_to_static.rs:20:14 |
21 |
| - | |
22 |
| -LL | unsafe { *(&FOO as *const _ as *const usize) } |
23 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
24 |
| - |
25 |
| -warning: skipping const checks |
26 |
| - --> $DIR/const_refers_to_static.rs:26:32 |
27 |
| - | |
28 |
| -LL | const READ_MUT: u32 = unsafe { MUTABLE }; |
29 |
| - | ^^^^^^^ |
30 |
| - |
31 |
| -warning: skipping const checks |
32 |
| - --> $DIR/const_refers_to_static.rs:26:32 |
| 22 | + --> $DIR/const_refers_to_static.rs:24:1 |
33 | 23 | |
|
34 | 24 | LL | const READ_MUT: u32 = unsafe { MUTABLE };
|
35 |
| - | ^^^^^^^ |
| 25 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
36 | 26 |
|
37 | 27 | error[E0080]: erroneous constant used
|
38 |
| - --> $DIR/const_refers_to_static.rs:31:5 |
| 28 | + --> $DIR/const_refers_to_static.rs:28:5 |
39 | 29 | |
|
40 | 30 | LL | MUTATE_INTERIOR_MUT;
|
41 | 31 | | ^^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
42 | 32 |
|
43 | 33 | error[E0080]: erroneous constant used
|
44 |
| - --> $DIR/const_refers_to_static.rs:33:5 |
| 34 | + --> $DIR/const_refers_to_static.rs:30:5 |
45 | 35 | |
|
46 | 36 | LL | READ_INTERIOR_MUT;
|
47 | 37 | | ^^^^^^^^^^^^^^^^^ referenced constant has errors
|
48 | 38 |
|
49 | 39 | error[E0080]: erroneous constant used
|
50 |
| - --> $DIR/const_refers_to_static.rs:35:5 |
| 40 | + --> $DIR/const_refers_to_static.rs:32:5 |
51 | 41 | |
|
52 | 42 | LL | READ_MUT;
|
53 | 43 | | ^^^^^^^^ referenced constant has errors
|
54 | 44 |
|
55 |
| -error: aborting due to 3 previous errors; 6 warnings emitted |
| 45 | +error: aborting due to 3 previous errors; 3 warnings emitted |
56 | 46 |
|
57 | 47 | For more information about this error, try `rustc --explain E0080`.
|
0 commit comments