diff options
Diffstat (limited to 'tests/ui/macros/macro-local-data-key-priv.rs')
-rw-r--r-- | tests/ui/macros/macro-local-data-key-priv.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-local-data-key-priv.rs b/tests/ui/macros/macro-local-data-key-priv.rs new file mode 100644 index 000000000..2e4f88f9a --- /dev/null +++ b/tests/ui/macros/macro-local-data-key-priv.rs @@ -0,0 +1,10 @@ +// check that the local data keys are private by default. + +mod bar { + thread_local!(static baz: f64 = 0.0); +} + +fn main() { + bar::baz.with(|_| ()); + //~^ ERROR `baz` is private +} |