]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/macro/trait-object-macro-matcher.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / test / ui / parser / macro / trait-object-macro-matcher.rs
1 // A single lifetime is not parsed as a type.
2 // `ty` matcher in particular doesn't accept a single lifetime
3
4 macro_rules! m {
5     ($t: ty) => {
6         let _: $t;
7     };
8 }
9
10 fn main() {
11     m!('static);
12     //~^ ERROR lifetime in trait object type must be followed by `+`
13     //~| ERROR at least one trait is required for an object type
14     //~| WARN trait objects without an explicit `dyn` are deprecated
15 }