]> git.proxmox.com Git - rustc.git/blob - src/test/ui/proc-macro/derive-helper-shadowing.rs
New upstream version 1.37.0+dfsg1
[rustc.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 attribute `empty_helper` is currently unknown
23 struct V;
24 }
25
26 0
27 }]
28 }
29
30 fn main() {
31 let s = S { field: [] };
32 }