rust/tests/ui/issues/issue-36116.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
334 B
Rust
Raw Normal View History

2017-07-29 09:47:12 +08:00
// Unnecessary path disambiguator is ok
//@ check-pass
2019-06-12 23:18:32 +08:00
macro_rules! m {
($p: path) => {
let _ = $p(0);
let _: $p;
}
}
struct Foo<T> {
_a: T,
}
struct S<T>(T);
2017-07-29 09:47:12 +08:00
fn f() {
let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>);
let g: Foo::<i32> = Foo { _a: 42 };
m!(S::<u8>);
}
2017-07-29 09:47:12 +08:00
fn main() {}