File tree 3 files changed +10
-8
lines changed
src/test/ui/threads-sendsync
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 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
3
3
|
4
4
LL | __KEY.get(Default::default)
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
6
6
|
7
7
= note: consult the function's documentation for information on how to avoid undefined behavior
8
8
9
9
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
11
11
|
12
12
LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
Original file line number Diff line number Diff line change 1
1
// revisions: mir thir
2
2
// [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"
3
5
4
6
#![ feature( thread_local) ]
5
7
#![ feature( cfg_target_thread_local, thread_local_internals) ]
@@ -17,8 +19,8 @@ static __KEY: std::thread::__OsLocalKeyInner<Foo> = std::thread::__OsLocalKeyInn
17
19
18
20
fn __getit ( _: Option < & mut Option < RefCell < String > > > ) -> std:: option:: Option < & ' static Foo > {
19
21
__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 `__
22
24
}
23
25
24
26
static FOO : std:: thread:: LocalKey < Foo > = std:: thread:: LocalKey :: new ( __getit) ;
Original file line number Diff line number Diff line change 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
3
3
|
4
4
LL | __KEY.get(Default::default)
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
6
6
|
7
7
= note: consult the function's documentation for information on how to avoid undefined behavior
8
8
9
9
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
11
11
|
12
12
LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
You can’t perform that action at this time.
0 commit comments