2020-06-21 21:37:17 +01:00
|
|
|
error: lifetime must precede `mut`
|
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:2:13
|
|
|
|
|
|
|
|
|
|
|
LL | fn x<'a>(x: &mut 'a i32){}
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
help: place the lifetime before `mut`
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - fn x<'a>(x: &mut 'a i32){}
|
|
|
|
|
LL + fn x<'a>(x: &'a mut i32){}
|
|
|
|
|
|
|
2020-06-21 21:37:17 +01:00
|
|
|
|
|
|
|
|
error[E0178]: expected a path on the left-hand side of `+`, not `&mut 'a`
|
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:14:13
|
|
|
|
|
|
|
|
|
|
|
LL | fn y<'a>(y: &mut 'a + Send) {
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
help: try adding parentheses
|
|
|
|
|
|
|
|
|
|
|
LL | fn y<'a>(y: &mut ('a + Send)) {
|
|
|
|
|
| + +
|
2020-06-21 21:37:17 +01:00
|
|
|
|
|
|
|
|
error: lifetime must precede `mut`
|
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:6:22
|
|
|
|
|
|
|
|
|
|
|
LL | fn w<$lt>(w: &mut $lt i32) {}
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^
|
2020-06-21 21:37:17 +01:00
|
|
|
...
|
|
|
|
|
LL | mac!('a);
|
2021-10-14 13:28:28 -05:00
|
|
|
| -------- in this macro invocation
|
2020-06-21 21:37:17 +01:00
|
|
|
|
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2024-07-06 03:07:46 +00:00
|
|
|
help: place the lifetime before `mut`
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - fn w<$lt>(w: &mut $lt i32) {}
|
|
|
|
|
LL + fn w<$lt>(w: &$lt mut i32) {}
|
|
|
|
|
|
|
2020-06-21 21:37:17 +01:00
|
|
|
|
|
|
|
|
error[E0423]: expected value, found trait `Send`
|
2021-07-10 10:00:54 +02:00
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:17:28
|
2020-06-21 21:37:17 +01:00
|
|
|
|
|
|
|
|
|
LL | let z = y as &mut 'a + Send;
|
|
|
|
|
| ^^^^ not a value
|
|
|
|
|
|
|
|
|
|
error[E0224]: at least one trait is required for an object type
|
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:14:18
|
|
|
|
|
|
|
|
|
|
|
LL | fn y<'a>(y: &mut 'a + Send) {
|
|
|
|
|
| ^^
|
|
|
|
|
|
2023-10-31 13:45:26 +00:00
|
|
|
error[E0224]: at least one trait is required for an object type
|
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:17:23
|
|
|
|
|
|
|
|
|
|
|
LL | let z = y as &mut 'a + Send;
|
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2020-06-21 21:37:17 +01:00
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0178, E0224, E0423.
|
|
|
|
|
For more information about an error, try `rustc --explain E0178`.
|