summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-36116.rs
blob: c7c70c7afe7430f11dbcc076c11e7a7880a3b465 (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
// Unnecessary path disambiguator is ok

// check-pass

macro_rules! m {
    ($p: path) => {
        let _ = $p(0);
        let _: $p;
    }
}

struct Foo<T> {
    _a: T,
}

struct S<T>(T);

fn f() {
    let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>);
    let g: Foo::<i32> = Foo { _a: 42 };

    m!(S::<u8>);
}

fn main() {}