1+ warning: unknown diagnostic attribute
2+ --> $DIR/feature-gate-diagnostic-on-move.rs:5:15
3+ |
4+ LL | #[diagnostic::on_move(message = "Foo")]
5+ | ^^^^^^^
6+ |
7+ = note: `#[warn(unknown_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default
8+
19error[E0382]: use of moved value: `foo`
2- --> $DIR/feature-gate-diagnostic-on-move.rs:16 :15
10+ --> $DIR/feature-gate-diagnostic-on-move.rs:15 :15
311 |
412LL | let foo = Foo;
513 | --- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
@@ -9,21 +17,21 @@ LL | let bar = foo;
917 | ^^^ value used here after move
1018 |
1119note: consider changing this parameter type in function `takes_foo` to borrow instead if owning the value isn't necessary
12- --> $DIR/feature-gate-diagnostic-on-move.rs:11 :17
20+ --> $DIR/feature-gate-diagnostic-on-move.rs:10 :17
1321 |
1422LL | fn takes_foo(_: Foo) {}
1523 | --------- ^^^ this parameter takes ownership of the value
1624 | |
1725 | in this function
1826note: if `Foo` implemented `Clone`, you could clone the value
19- --> $DIR/feature-gate-diagnostic-on-move.rs:9 :1
27+ --> $DIR/feature-gate-diagnostic-on-move.rs:8 :1
2028 |
2129LL | struct Foo;
2230 | ^^^^^^^^^^ consider implementing `Clone` for this type
2331...
2432LL | takes_foo(foo);
2533 | --- you could clone this value
2634
27- error: aborting due to 1 previous error
35+ error: aborting due to 1 previous error; 1 warning emitted
2836
2937For more information about this error, try `rustc --explain E0382`.
0 commit comments