Add test of thread_local! breaking on redefined u8

This commit is contained in:
David Tolnay 2022-04-02 11:37:53 -07:00
parent fbc45b650a
commit c20f8d2fd6
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View 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() {}