diff options
Diffstat (limited to 'src/test/ui/thread-local/name-collision.rs')
-rw-r--r-- | src/test/ui/thread-local/name-collision.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/thread-local/name-collision.rs b/src/test/ui/thread-local/name-collision.rs new file mode 100644 index 000000000..dcff9183a --- /dev/null +++ b/src/test/ui/thread-local/name-collision.rs @@ -0,0 +1,15 @@ +// check-pass + +#[allow(non_camel_case_types)] +struct u8; + +std::thread_local! { + pub static A: i32 = f(); + pub static B: i32 = const { 0 }; +} + +fn f() -> i32 { + 0 +} + +fn main() {} |