2020-06-21 21:37:17 +01:00
|
|
|
#![crate_type="lib"]
|
|
|
|
fn x<'a>(x: &mut 'a i32){} //~ ERROR lifetime must precede `mut`
|
|
|
|
|
|
|
|
macro_rules! mac {
|
|
|
|
($lt:lifetime) => {
|
|
|
|
fn w<$lt>(w: &mut $lt i32) {}
|
|
|
|
//~^ ERROR lifetime must precede `mut`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mac!('a);
|
|
|
|
|
|
|
|
// avoid false positives
|
|
|
|
fn y<'a>(y: &mut 'a + Send) {
|
2025-04-15 07:44:24 +02:00
|
|
|
//~^ ERROR expected a path on the left-hand side of `+`
|
2020-06-21 21:37:17 +01:00
|
|
|
//~| ERROR at least one trait is required for an object type
|
|
|
|
let z = y as &mut 'a + Send;
|
|
|
|
//~^ ERROR expected value, found trait `Send`
|
2023-10-31 13:45:26 +00:00
|
|
|
//~| ERROR at least one trait is required for an object type
|
2020-06-21 21:37:17 +01:00
|
|
|
}
|