Skip to content

Commit

Permalink
avoid fully qualifying error output of issue-43733 test
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilgardis committed Apr 25, 2022
1 parent 2e47271 commit f71597c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/test/ui/threads-sendsync/issue-43733.mir.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0133]: call to unsafe function `std::thread::__FastLocalKeyInner::<T>::get` is unsafe and requires unsafe function or block
--> $DIR/issue-43733.rs:19:5
error[E0133]: call to unsafe function `std::thread::$LOCALKEYINNER::<T>::get` is unsafe and requires unsafe function or block
--> $DIR/issue-43733.rs:21:5
|
LL | __KEY.get(Default::default)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
|
= 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
--> $DIR/issue-43733.rs:24:42
--> $DIR/issue-43733.rs:26:42
|
LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
Expand Down
6 changes: 4 additions & 2 deletions src/test/ui/threads-sendsync/issue-43733.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
// normalize-stderr-test: "__FastLocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get"
// normalize-stderr-test: "__OsLocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get"

#![feature(thread_local)]
#![feature(cfg_target_thread_local, thread_local_internals)]
Expand All @@ -17,8 +19,8 @@ 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::__FastLocalKeyInner::<T>::get` is unsafe
//[thir]~^^ ERROR call to unsafe function `__FastLocalKeyInner::<T>::get` is unsafe
//[mir]~^ ERROR call to unsafe function `std::thread::
//[thir]~^^ ERROR call to unsafe function `__
}

static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/threads-sendsync/issue-43733.thir.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0133]: call to unsafe function `__FastLocalKeyInner::<T>::get` is unsafe and requires unsafe function or block
--> $DIR/issue-43733.rs:19:5
error[E0133]: call to unsafe function `$LOCALKEYINNER::<T>::get` is unsafe and requires unsafe function or block
--> $DIR/issue-43733.rs:21:5
|
LL | __KEY.get(Default::default)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `LocalKey::<T>::new` is unsafe and requires unsafe function or block
--> $DIR/issue-43733.rs:24:42
--> $DIR/issue-43733.rs:26:42
|
LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
Expand Down

0 comments on commit f71597c

Please sign in to comment.