mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
15 lines
339 B
Rust
15 lines
339 B
Rust
// 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 lifetime in trait object type must be followed by `+`
|
|
//~| ERROR at least one trait is required for an object type
|
|
}
|