Add test of thread_local! breaking on redefined u8
This commit is contained in:
parent
fbc45b650a
commit
c20f8d2fd6
1 changed files with 15 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue