| 1 |
#![feature(rustc_attrs)] |
| 2 |
|
| 3 |
#[rustc_builtin_macro] |
| 4 |
macro_rules! concat { |
| 5 |
() => {{}}; |
| 6 |
} |
| 7 |
|
| 8 |
fn main() { |
| 9 |
let not_literal = "identifier"; |
| 10 |
concat!(); |
| 11 |
concat! (,); // { dg-error "expected expression, found .,." } |
| 12 |
concat!(not_literal); // { dg-error "expected a literal" } |
| 13 |
concat!("message"); |
| 14 |
concat!("message",); |
| 15 |
concat!("message", 1, true, false, 1.0, 10usize, 2000u64); |
| 16 |
concat!("message", 1, true, false, 1.0, 10usize, 2000u64,); |
| 17 |
concat! ("m", not_literal); // { dg-error "expected a literal" } |
| 18 |
concat!(not_literal invalid 'm' !!,); // { dg-error "expected token: .,." } |
| 19 |
} |