Skip to content

Commit 12fee7b

Browse files
committed
Update tests.
1 parent 5a62ebb commit 12fee7b

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

tests/ui/macros/macro-local-data-key-priv.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: the constant `baz` is defined here
99
|
1010
LL | thread_local!(static baz: f64 = 0.0);
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
= note: this error originates in the macro `$crate::__thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
12+
= note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
1313

1414
error: aborting due to previous error
1515

tests/ui/threads-sendsync/issue-43733-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl<T> Key<T> {
2121
}
2222

2323
#[cfg(target_thread_local)]
24-
use std::thread::__LocalKeyInner as Key;
24+
use std::thread::local_impl::Key;
2525

2626
static __KEY: Key<()> = Key::new();
2727
//~^ ERROR `UnsafeCell<Option<()>>` cannot be shared between threads

tests/ui/threads-sendsync/issue-43733.mir.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
2-
--> $DIR/issue-43733.rs:21:5
2+
--> $DIR/issue-43733.rs:19: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 is unsafe and requires unsafe function or block
10-
--> $DIR/issue-43733.rs:26:42
10+
--> $DIR/issue-43733.rs:24:42
1111
|
1212
LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function

tests/ui/threads-sendsync/issue-43733.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// ignore-wasm32
22
// revisions: mir thir
33
// [thir]compile-flags: -Z thir-unsafeck
4-
// normalize-stderr-test: "__LocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get"
5-
// normalize-stderr-test: "__LocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get"
64
#![feature(thread_local)]
75
#![feature(cfg_target_thread_local, thread_local_internals)]
86

@@ -12,15 +10,15 @@ type Foo = std::cell::RefCell<String>;
1210

1311
#[cfg(target_thread_local)]
1412
#[thread_local]
15-
static __KEY: std::thread::__LocalKeyInner<Foo> = std::thread::__LocalKeyInner::new();
13+
static __KEY: std::thread::local_impl::Key<Foo> = std::thread::local_impl::Key::new();
1614

1715
#[cfg(not(target_thread_local))]
18-
static __KEY: std::thread::__LocalKeyInner<Foo> = std::thread::__LocalKeyInner::new();
16+
static __KEY: std::thread::local_impl::Key<Foo> = std::thread::local_impl::Key::new();
1917

2018
fn __getit(_: Option<&mut Option<RefCell<String>>>) -> std::option::Option<&'static Foo> {
2119
__KEY.get(Default::default)
2220
//[mir]~^ ERROR call to unsafe function is unsafe
23-
//[thir]~^^ ERROR call to unsafe function `__
21+
//[thir]~^^ ERROR call to unsafe function `Key::<T>::get`
2422
}
2523

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

tests/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 `$LOCALKEYINNER::<T>::get` is unsafe and requires unsafe function or block
2-
--> $DIR/issue-43733.rs:21:5
1+
error[E0133]: call to unsafe function `Key::<T>::get` is unsafe and requires unsafe function or block
2+
--> $DIR/issue-43733.rs:19: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:26:42
10+
--> $DIR/issue-43733.rs:24: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)