Add test case for #[thread_local] on extern statics
This commit is contained in:
parent
d485a511d0
commit
ca76cf120b
2 changed files with 12 additions and 0 deletions
2
src/test/auxiliary/thread-local-extern-static.rs
Normal file
2
src/test/auxiliary/thread-local-extern-static.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#[thread_local]
|
||||
pub static FOO: u32 = 3;
|
10
src/test/run-pass/thread-local-extern-static.rs
Normal file
10
src/test/run-pass/thread-local-extern-static.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
extern crate thread_local_extern_static;
|
||||
|
||||
extern {
|
||||
#[thread_local]
|
||||
static FOO: u32;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert_eq!(FOO, 3);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue