blob: 657d57967bbf1025afae30ed753aab4dd957d161 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
error: use of extern static is unsafe and requires unsafe function or block (error E0133)
--> $DIR/safe-extern-statics.rs:23:13
|
LL | let a = A; //~ ERROR use of extern static is unsafe
| ^
|
= note: #[deny(safe_extern_statics)] on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #36247 <https://github.com/rust-lang/rust/issues/36247>
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
error: use of extern static is unsafe and requires unsafe function or block (error E0133)
--> $DIR/safe-extern-statics.rs:25:14
|
LL | let ra = &A; //~ ERROR use of extern static is unsafe
| ^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #36247 <https://github.com/rust-lang/rust/issues/36247>
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
error: use of extern static is unsafe and requires unsafe function or block (error E0133)
--> $DIR/safe-extern-statics.rs:27:14
|
LL | let xa = XA; //~ ERROR use of extern static is unsafe
| ^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #36247 <https://github.com/rust-lang/rust/issues/36247>
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
error: use of extern static is unsafe and requires unsafe function or block (error E0133)
--> $DIR/safe-extern-statics.rs:29:15
|
LL | let xra = &XA; //~ ERROR use of extern static is unsafe
| ^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #36247 <https://github.com/rust-lang/rust/issues/36247>
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
error: aborting due to 4 previous errors
|