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