summary refs log tree commit diff
path: root/src/test/ui/proc-macro/derive-helper-shadowing.rs
blob: d4a0721147ab4e6f88fcf3613af15afdee315c63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// aux-build:derive-helper-shadowing.rs

extern crate derive_helper_shadowing;
use derive_helper_shadowing::*;

#[my_attr] //~ ERROR `my_attr` is ambiguous
#[derive(MyTrait)]
struct S {
    // FIXME No ambiguity, attributes in non-macro positions are not resolved properly
    #[my_attr]
    field: [u8; {
        // FIXME No ambiguity, derive helpers are not put into scope for non-attributes
        use my_attr;

        // FIXME No ambiguity, derive helpers are not put into scope for inner items
        #[my_attr]
        struct U;

        0
    }]
}

fn main() {
    let s = S { field: [] };
}