summaryrefslogtreecommitdiffstats
path: root/src/test/ui/hygiene/arguments.rs
blob: f0f732f4c6ff38173a1760dc4bfee03e853375ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]

macro m($t:ty, $e:expr) {
    mod foo {
        #[allow(unused)]
        struct S;
        pub(super) fn f(_: $t) {}
    }
    foo::f($e);
}

fn main() {
    struct S;
    m!(S, S); //~ ERROR cannot find type `S` in this scope
}