summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/import-after-macro-expand-12.rs
blob: f92e8c12fca81bf3ac28220f67561702483d44ee (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
26
27
28
29
30
31
32
33
34
// check-pass
// https://github.com/rust-lang/rust/issues/115377

use module::*;

mod module {
    pub enum B {}
    impl B {
        pub const ASSOC: u8 = 0;
    }
}

#[derive()]
pub enum B {}
impl B {
    pub const ASSOC: u16 = 0;
}

macro_rules! m {
    ($right:expr) => {
        $right
    };
}

fn main() {
    let a: u16 = {
        use self::*;
        B::ASSOC
    };
    let b: u16 = m!({
        use self::*;
        B::ASSOC
    });
}