rust/src/test/ui/span/macro-ty-params.rs

13 lines
324 B
Rust
Raw Normal View History

macro_rules! m {
($p1: path) => {
#[derive($p1)] struct U;
}
}
fn main() {
2017-11-20 06:13:27 -06:00
foo::<T>!(); //~ ERROR generic arguments in macro path
foo::<>!(); //~ ERROR generic arguments in macro path
m!(MyTrait<>); //~ ERROR generic arguments in macro path
//~^ ERROR unexpected generic arguments in path
}