]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/issue-73568-lifetime-after-mut.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / parser / 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 //~| WARNING trait objects without an explicit `dyn` are deprecated
17 //~| ERROR at least one trait is required for an object type
18 let z = y as &mut 'a + Send;
19 //~^ ERROR expected value, found trait `Send`
20 //~| WARNING trait objects without an explicit `dyn` are deprecated
21 }