diff options
Diffstat (limited to 'tests/ui/span/macro-ty-params.rs')
-rw-r--r-- | tests/ui/span/macro-ty-params.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/span/macro-ty-params.rs b/tests/ui/span/macro-ty-params.rs new file mode 100644 index 000000000..cf28b0255 --- /dev/null +++ b/tests/ui/span/macro-ty-params.rs @@ -0,0 +1,15 @@ +macro_rules! m { + ($p1: path) => { + #[derive($p1)] struct U; + } +} + +macro_rules! foo { () => () } + +fn main() { + foo::<T>!(); //~ ERROR generic arguments in macro path + foo::<>!(); //~ ERROR generic arguments in macro path + m!(Default<>); + //~^ ERROR unexpected generic arguments in path + //~^^ ERROR generic arguments in macro path +} |