diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-36116.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-36116.rs b/src/test/ui/issues/issue-36116.rs new file mode 100644 index 000000000..c7c70c7af --- /dev/null +++ b/src/test/ui/issues/issue-36116.rs @@ -0,0 +1,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() {} |