]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-36116.rs
New upstream version 1.37.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-36116.rs
1 // Unnecessary path disambiguator is ok
2
3 // check-pass
4
5 macro_rules! m {
6 ($p: path) => {
7 let _ = $p(0);
8 let _: $p;
9 }
10 }
11
12 struct Foo<T> {
13 _a: T,
14 }
15
16 struct S<T>(T);
17
18 fn f() {
19 let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>);
20 let g: Foo::<i32> = Foo { _a: 42 };
21
22 m!(S::<u8>);
23 }
24
25 fn main() {}