]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/derive-helper-shadowing.rs
21af4093a037de46f187556cfdd07ff63ad53d33
[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             // FIXME No ambiguity, attributes in non-macro positions are not resolved properly
23             #[empty_helper]
24             struct V;
25         }
26
27         0
28     }]
29 }
30
31 fn main() {
32     let s = S { field: [] };
33 }