diff options
Diffstat (limited to 'src/test/ui/threads-sendsync')
| -rw-r--r-- | src/test/ui/threads-sendsync/issue-43733.mir.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/threads-sendsync/issue-43733.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/test/ui/threads-sendsync/issue-43733.mir.stderr b/src/test/ui/threads-sendsync/issue-43733.mir.stderr index 219c6cb23d0..1e21a6b37a9 100644 --- a/src/test/ui/threads-sendsync/issue-43733.mir.stderr +++ b/src/test/ui/threads-sendsync/issue-43733.mir.stderr @@ -1,4 +1,4 @@ -error[E0133]: call to unsafe function `std::thread::$LOCALKEYINNER::<T>::get` is unsafe and requires unsafe function or block +error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/issue-43733.rs:21:5 | LL | __KEY.get(Default::default) @@ -6,7 +6,7 @@ LL | __KEY.get(Default::default) | = note: consult the function's documentation for information on how to avoid undefined behavior -error[E0133]: call to unsafe function `std::thread::LocalKey::<T>::new` is unsafe and requires unsafe function or block +error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/issue-43733.rs:26:42 | LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit); diff --git a/src/test/ui/threads-sendsync/issue-43733.rs b/src/test/ui/threads-sendsync/issue-43733.rs index e613c2b03e6..0ac6f588fb1 100644 --- a/src/test/ui/threads-sendsync/issue-43733.rs +++ b/src/test/ui/threads-sendsync/issue-43733.rs @@ -19,13 +19,13 @@ static __KEY: std::thread::__OsLocalKeyInner<Foo> = std::thread::__OsLocalKeyInn fn __getit(_: Option<&mut Option<RefCell<String>>>) -> std::option::Option<&'static Foo> { __KEY.get(Default::default) - //[mir]~^ ERROR call to unsafe function `std::thread:: + //[mir]~^ ERROR call to unsafe function is unsafe //[thir]~^^ ERROR call to unsafe function `__ } static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit); -//[mir]~^ ERROR call to unsafe function `std::thread::LocalKey::<T>::new` is unsafe -//[thir]~^^ ERROR call to unsafe function `LocalKey::<T>::new` is unsafe +//[mir]~^ ERROR call to unsafe function is unsafe +//[thir]~^^ ERROR call to unsafe function `LocalKey::<T>::new` fn main() { FOO.with(|foo| println!("{}", foo.borrow())); diff --git a/src/test/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs b/src/test/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs index 84704a21137..8baef433410 100644 --- a/src/test/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs +++ b/src/test/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs @@ -1,6 +1,7 @@ // run-pass // no-prefer-dynamic // ignore-emscripten no threads support + static mut HIT: bool = false; struct Foo; |
