2020-06-21 15:37:17 -05:00
|
|
|
error: lifetime must precede `mut`
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:2:13
|
|
|
|
|
|
|
|
|
LL | fn x<'a>(x: &mut 'a i32){}
|
|
|
|
| ^^^^^^^ help: place the lifetime before `mut`: `&'a mut`
|
|
|
|
|
|
|
|
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) {
|
|
|
|
| ^^^^^^^^^^^^^^ help: try adding parentheses: `&mut ('a + Send)`
|
|
|
|
|
|
|
|
error: lifetime must precede `mut`
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:6:22
|
|
|
|
|
|
|
|
|
LL | fn w<$lt>(w: &mut $lt i32) {}
|
|
|
|
| ^^^^^^^^ help: place the lifetime before `mut`: `&$lt mut`
|
|
|
|
...
|
|
|
|
LL | mac!('a);
|
|
|
|
| --------- in this macro invocation
|
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-06-21 15:37:17 -05:00
|
|
|
|
|
|
|
error[E0423]: expected value, found trait `Send`
|
2021-04-16 04:06:51 -05:00
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:19:28
|
2020-06-21 15:37:17 -05:00
|
|
|
|
|
|
|
|
LL | let z = y as &mut 'a + Send;
|
|
|
|
| ^^^^ not a value
|
|
|
|
|
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:14:18
|
|
|
|
|
|
|
|
|
LL | fn y<'a>(y: &mut 'a + Send) {
|
|
|
|
| ^^ help: use `dyn`: `dyn 'a`
|
|
|
|
|
|
|
|
|
= note: `#[warn(bare_trait_objects)]` on by default
|
2021-06-16 07:27:44 -05:00
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
2021-08-09 10:45:01 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
2020-06-21 15:37:17 -05:00
|
|
|
|
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
2021-04-16 04:06:51 -05:00
|
|
|
--> $DIR/issue-73568-lifetime-after-mut.rs:19:23
|
2020-06-21 15:37:17 -05:00
|
|
|
|
|
|
|
|
LL | let z = y as &mut 'a + Send;
|
|
|
|
| ^^ help: use `dyn`: `dyn 'a`
|
2021-04-16 04:06:51 -05:00
|
|
|
|
|
2021-06-16 07:27:44 -05:00
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
2021-08-09 10:45:01 -05:00
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
2020-06-21 15:37:17 -05:00
|
|
|
|
|
|
|
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) {
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors; 2 warnings emitted
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0178, E0224, E0423.
|
|
|
|
For more information about an error, try `rustc --explain E0178`.
|