diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-05-13 23:36:19 +0200 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-05-22 16:21:33 +0200 |
| commit | 6dfdea9800fddeeed8a94ea2bbd4afeab96bb05c (patch) | |
| tree | a354df7f3551d24d75ec997a385cf43067002fdb /src/test/ui/issues | |
| parent | 6f64eb1fe65f37c3895375c03374cb8680bcd09e (diff) | |
Make the THIR unsafeck use the `thir_body` query
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-16538.thir.stderr | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/issues/issue-16538.thir.stderr b/src/test/ui/issues/issue-16538.thir.stderr index d7e8c08bb01..435334c3228 100644 --- a/src/test/ui/issues/issue-16538.thir.stderr +++ b/src/test/ui/issues/issue-16538.thir.stderr @@ -1,3 +1,11 @@ +error[E0133]: use of extern static is unsafe and requires unsafe function or block + --> $DIR/issue-16538.rs:14:34 + | +LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X); + | ^^^^ use of extern static + | + = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior + error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants --> $DIR/issue-16538.rs:14:27 | @@ -13,14 +21,6 @@ LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X); = help: the trait `Sync` is not implemented for `*const usize` = note: shared static variables must have a type that implements `Sync` -error[E0133]: use of extern static is unsafe and requires unsafe function or block - --> $DIR/issue-16538.rs:14:34 - | -LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X); - | ^^^^ use of extern static - | - = 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 3 previous errors Some errors have detailed explanations: E0015, E0133, E0277. |
