diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-04-26 10:43:00 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-04-26 14:49:28 +0000 |
| commit | 3568bdc6cdf04da3bf8f1be02741ea731265a3da (patch) | |
| tree | f0b01b7b7588baf7c0cf525b12a77525d4113e53 /src/test/ui/threads-sendsync | |
| parent | 1c988cfa0b7f4d3bc5b1cb40dc5002f5adbfb9ad (diff) | |
| download | rust-3568bdc6cdf04da3bf8f1be02741ea731265a3da.tar.gz rust-3568bdc6cdf04da3bf8f1be02741ea731265a3da.zip | |
Revert "add `DefId` to unsafety violations and display function path in E0133"
This reverts commit 8b8f6653cfd54525714f02efe7af0a0f830e185c.
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; |
