-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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
Minimal reproduction:
#[derive(Eq, PartialEq, PartialOrd)]
struct Foo<'a, T: 'a>(&'a mut [T]);
This produces the following error message repeated precisely 8 times. I cannot tell you why this is, I have no idea. I assume it's a failure in the PartialOrd
derivation code that's not being reported correctly.
error[E0389]: cannot borrow data mutably in a `&` reference
--> src/main.rs:2:23
|
2 | struct Foo<'a, T: 'a>(&'a mut [T]);
| ^^^^^^^^^^^^
| |
| assignment into an immutable reference
| consider changing this to `&'a mut [T])`
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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.