]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/issues/issue-73568-lifetime-after-mut.rs
Rollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC
[rust.git] / src / test / ui / parser / issues / issue-73568-lifetime-after-mut.rs
1 #![crate_type="lib"]
2 fn x<'a>(x: &mut 'a i32){} //~ ERROR lifetime must precede `mut`
3
4 macro_rules! mac {
5     ($lt:lifetime) => {
6         fn w<$lt>(w: &mut $lt i32) {}
7         //~^ ERROR lifetime must precede `mut`
8     }
9 }
10
11 mac!('a);
12
13 // avoid false positives
14 fn y<'a>(y: &mut 'a + Send) {
15     //~^ ERROR expected a path on the left-hand side of `+`, not `&mut 'a`
16     //~| ERROR at least one trait is required for an object type
17     let z = y as &mut 'a + Send;
18     //~^ ERROR expected value, found trait `Send`
19 }