2017-07-28 20:47:12 -05:00
|
|
|
// Unnecessary path disambiguator is ok
|
|
|
|
|
2018-10-31 07:08:01 -05:00
|
|
|
// compile-pass
|
|
|
|
// skip-codegen
|
2017-07-28 20:47:12 -05:00
|
|
|
#![allow(unused)]
|
2017-08-10 18:30:08 -05:00
|
|
|
macro_rules! m {
|
|
|
|
($p: path) => {
|
|
|
|
let _ = $p(0);
|
|
|
|
let _: $p;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-01 18:58:44 -05:00
|
|
|
struct Foo<T> {
|
|
|
|
_a: T,
|
|
|
|
}
|
|
|
|
|
2017-08-10 18:30:08 -05:00
|
|
|
struct S<T>(T);
|
|
|
|
|
2017-07-28 20:47:12 -05:00
|
|
|
fn f() {
|
2019-01-12 19:52:59 -06:00
|
|
|
let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>);
|
|
|
|
let g: Foo::<i32> = Foo { _a: 42 };
|
2017-08-10 18:30:08 -05:00
|
|
|
|
2019-01-12 19:52:59 -06:00
|
|
|
m!(S::<u8>);
|
2016-09-01 18:58:44 -05:00
|
|
|
}
|
2017-07-28 20:47:12 -05:00
|
|
|
|
2018-10-31 07:08:01 -05:00
|
|
|
|
|
|
|
fn main() {}
|