This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
src/test/ui/threads-sendsync Expand file tree Collapse file tree 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
33 |
44LL | __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
99error[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 |
1212LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
Original file line number Diff line number Diff line change 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
1820fn __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
2426static 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
33 |
44LL | __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
99error[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 |
1212LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
You can’t perform that action at this time.
0 commit comments