-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
In tests/ui/moves/invalid-suggestions-destructuring-assignment-drop.stderr (and other cases) we currently output
error[E0509]: cannot move out of type `Thing`, which implements the `Drop` trait
--> $DIR/invalid-suggestions-destructuring-assignment-drop.rs:12:34
|
LL | Thing(*&mut String::new()) = Thing(String::new());
| ------------------- ^^^^^^^^^^^^^^^^^^^^ cannot move out of here
| |
| data moved here
| move occurs because the place has type `String`, which does not implement the `Copy` trait
but ideally we should unify labels whenever possible. In this case, it should be
error[E0509]: cannot move out of type `Thing`, which implements the `Drop` trait
--> $DIR/invalid-suggestions-destructuring-assignment-drop.rs:12:34
|
LL | Thing(*&mut String::new()) = Thing(String::new());
| ------------------- ^^^^^^^^^^^^^^^^^^^^ cannot move out of here
| |
| data moved here because the place has type `String`, which does not implement the `Copy` trait
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.