]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/derive-helper-shadowing.rs
Rollup merge of #61884 - crlf0710:stablize_euc, r=dtolnay,Centril
[rust.git] / src / test / ui / proc-macro / derive-helper-shadowing.rs
1 // aux-build:test-macros.rs
2
3 #[macro_use]
4 extern crate test_macros;
5
6 use test_macros::empty_attr as empty_helper;
7
8 #[empty_helper] //~ ERROR `empty_helper` is ambiguous
9 #[derive(Empty)]
10 struct S {
11     // FIXME No ambiguity, attributes in non-macro positions are not resolved properly
12     #[empty_helper]
13     field: [u8; {
14         // FIXME No ambiguity, derive helpers are not put into scope for non-attributes
15         use empty_helper;
16
17         // FIXME No ambiguity, derive helpers are not put into scope for inner items
18         #[empty_helper]
19         struct U;
20
21         mod inner {
22             #[empty_helper] //~ ERROR cannot find attribute macro `empty_helper` in this scope
23             struct V;
24         }
25
26         0
27     }]
28 }
29
30 fn main() {
31     let s = S { field: [] };
32 }