rust/src/test/ui/parser/macro/trait-object-macro-matcher.rs

11 lines
233 B
Rust
Raw Normal View History

2017-03-16 16:47:32 -05:00
// A single lifetime is not parsed as a type.
// `ty` matcher in particular doesn't accept a single lifetime
macro_rules! m {
($t: ty) => ( let _: $t; )
}
fn main() {
m!('static); //~ ERROR expected type, found `'static`
}