diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-04-02 03:34:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-02 03:34:25 +0200 |
| commit | dc11de63e087542e41c5cb8fa1bc51d550c25b69 (patch) | |
| tree | aa89538b1abe69b2e9fd0a84cb7afea9c1ca7807 /src | |
| parent | d6f6084b24923f14bff0cf31ef78da9383cfb397 (diff) | |
| parent | 1f232b8e6de8ef170e896a2a98734dd54273349b (diff) | |
Rollup merge of #95557 - niluxv:issue-95533, r=dtolnay
Fix `thread_local!` macro to be compatible with `no_implicit_prelude` Fixes issue #95533.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/macros/issue-95533.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/macros/issue-95533.rs b/src/test/ui/macros/issue-95533.rs new file mode 100644 index 00000000000..905c14dc5fd --- /dev/null +++ b/src/test/ui/macros/issue-95533.rs @@ -0,0 +1,8 @@ +// check-pass + +#![no_implicit_prelude] +// the macro should not rely on the prelude being imported +::std::thread_local! { static P: () = (); } +::std::thread_local! { static Q: () = const { () }; } + +fn main () {} |
