]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/bad-recover-ty-after-impl.rs
Do not eagerly recover for bad impl-trait in macros
[rust.git] / tests / ui / parser / bad-recover-ty-after-impl.rs
1 // check-pass
2
3 macro_rules! impl_primitive {
4     ($ty:ty) => { impl_primitive!(impl $ty); };
5     (impl $ty:ty) => { fn a(_: $ty) {} }
6 }
7
8 impl_primitive! { u8 }
9
10 macro_rules! test {
11     ($ty:ty) => { compile_error!("oh no"); };
12     (impl &) => {};
13 }
14
15 test!(impl &);
16
17 fn main() {}