From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/threads-sendsync/thread-local-syntax.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/test/ui/threads-sendsync/thread-local-syntax.rs (limited to 'src/test/ui/threads-sendsync/thread-local-syntax.rs') diff --git a/src/test/ui/threads-sendsync/thread-local-syntax.rs b/src/test/ui/threads-sendsync/thread-local-syntax.rs new file mode 100644 index 000000000..2f4805e47 --- /dev/null +++ b/src/test/ui/threads-sendsync/thread-local-syntax.rs @@ -0,0 +1,22 @@ +// run-pass +#![deny(missing_docs)] +//! this tests the syntax of `thread_local!` + +mod foo { + mod bar { + thread_local! { + // no docs + #[allow(unused)] + static FOO: i32 = 42; + /// docs + pub static BAR: String = String::from("bar"); + + // look at these restrictions!! + pub(crate) static BAZ: usize = 0; + pub(in foo) static QUUX: usize = 0; + } + thread_local!(static SPLOK: u32 = 0); + } +} + +fn main() {} -- cgit v1.2.3