Skip to content

Commit f71597c

Browse files
committed
avoid fully qualifying error output of issue-43733 test
1 parent 2e47271 commit f71597c

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/test/ui/threads-sendsync/issue-43733.mir.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
error[E0133]: call to unsafe function `std::thread::__FastLocalKeyInner::<T>::get` is unsafe and requires unsafe function or block
2-
--> $DIR/issue-43733.rs:19:5
1+
error[E0133]: call to unsafe function `std::thread::$LOCALKEYINNER::<T>::get` is unsafe and requires unsafe function or block
2+
--> $DIR/issue-43733.rs:21:5
33
|
44
LL | __KEY.get(Default::default)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
66
|
77
= note: consult the function's documentation for information on how to avoid undefined behavior
88

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

src/test/ui/threads-sendsync/issue-43733.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// revisions: mir thir
22
// [thir]compile-flags: -Z thir-unsafeck
3+
// normalize-stderr-test: "__FastLocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get"
4+
// normalize-stderr-test: "__OsLocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get"
35

46
#![feature(thread_local)]
57
#![feature(cfg_target_thread_local, thread_local_internals)]
@@ -17,8 +19,8 @@ static __KEY: std::thread::__OsLocalKeyInner<Foo> = std::thread::__OsLocalKeyInn
1719

1820
fn __getit(_: Option<&mut Option<RefCell<String>>>) -> std::option::Option<&'static Foo> {
1921
__KEY.get(Default::default)
20-
//[mir]~^ ERROR call to unsafe function `std::thread::__FastLocalKeyInner::<T>::get` is unsafe
21-
//[thir]~^^ ERROR call to unsafe function `__FastLocalKeyInner::<T>::get` is unsafe
22+
//[mir]~^ ERROR call to unsafe function `std::thread::
23+
//[thir]~^^ ERROR call to unsafe function `__
2224
}
2325

2426
static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);

src/test/ui/threads-sendsync/issue-43733.thir.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
error[E0133]: call to unsafe function `__FastLocalKeyInner::<T>::get` is unsafe and requires unsafe function or block
2-
--> $DIR/issue-43733.rs:19:5
1+
error[E0133]: call to unsafe function `$LOCALKEYINNER::<T>::get` is unsafe and requires unsafe function or block
2+
--> $DIR/issue-43733.rs:21:5
33
|
44
LL | __KEY.get(Default::default)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
66
|
77
= note: consult the function's documentation for information on how to avoid undefined behavior
88

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

0 commit comments

Comments
 (0)