summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/macro/trait-object-macro-matcher.rs
blob: 560195977d03a91776673da99db60d48b1f9a70b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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
}