diff --git a/src/test/compile-fail/issue-43733-2.rs b/src/test/compile-fail/issue-43733-2.rs index c14592187ab..dae27c4785f 100644 --- a/src/test/compile-fail/issue-43733-2.rs +++ b/src/test/compile-fail/issue-43733-2.rs @@ -5,7 +5,7 @@ #[cfg(not(target_thread_local))] struct Key { _data: std::cell::UnsafeCell>, - _flag: std::cell::Cell, + _flag: std::cell::Cell<()>, } #[cfg(not(target_thread_local))] @@ -13,7 +13,7 @@ impl Key { const fn new() -> Self { Key { _data: std::cell::UnsafeCell::new(None), - _flag: std::cell::Cell::new(false), + _flag: std::cell::Cell::new(()), } } } @@ -23,7 +23,6 @@ use std::thread::__FastLocalKeyInner as Key; static __KEY: Key<()> = Key::new(); //~^ ERROR `std::cell::UnsafeCell>` cannot be shared between threads -//~| ERROR `std::cell::Cell` cannot be shared between threads -// safely [E0277] +//~| ERROR cannot be shared between threads safely [E0277] fn main() {}