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