mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 13:13:40 +00:00
18 lines
280 B
Rust
18 lines
280 B
Rust
//@ check-pass
|
|
|
|
macro_rules! impl_primitive {
|
|
($ty:ty) => { impl_primitive!(impl $ty); };
|
|
(impl $ty:ty) => { fn a(_: $ty) {} }
|
|
}
|
|
|
|
impl_primitive! { u8 }
|
|
|
|
macro_rules! test {
|
|
($ty:ty) => { compile_error!("oh no"); };
|
|
(impl &) => {};
|
|
}
|
|
|
|
test!(impl &);
|
|
|
|
fn main() {}
|