mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 06:26:55 +00:00
Add test of thread_local! breaking on redefined u8
This commit is contained in:
parent
fbc45b650a
commit
c20f8d2fd6
15
src/test/ui/thread-local/name-collision.rs
Normal file
15
src/test/ui/thread-local/name-collision.rs
Normal file
@ -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() {}
|
Loading…
Reference in New Issue
Block a user