2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2016-06-04 14:19:22 -05:00
|
|
|
#![deny(missing_docs)]
|
|
|
|
//! this tests the syntax of `thread_local!`
|
|
|
|
|
2017-03-31 22:06:34 -05:00
|
|
|
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);
|
|
|
|
}
|
2016-06-04 14:19:22 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|