-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Arithmetic makes borrow checker overly restrictive #29743
Copy link
Copy link
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language teamfixed-by-NLLBugs fixed, but only when NLL is enabled.Bugs fixed, but only when NLL is enabled.
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language teamfixed-by-NLLBugs fixed, but only when NLL is enabled.Bugs fixed, but only when NLL is enabled.
Type
Fields
Give feedbackNo fields configured for issues without a type.
UPDATE: This was fixed by #47167 but still needs a regression test to be added.
I had expect the
- 1not to make any difference, but the borrow checker complains with the following error: