From b148c25cacd05a0268537ead29881357317a4073 Mon Sep 17 00:00:00 2001 From: tyler Date: Wed, 19 Jun 2019 11:50:23 -0700 Subject: [PATCH] fix compile-fail test for targets without thread locals --- src/test/compile-fail/issue-43733-2.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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() {}