-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Regression in error reporting on {integer} type ambiguity between 1.61 and 1.62 #98404
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium 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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Milestone
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium 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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is strongly related to #98357.
The presence of a
Mulimpl for bothu8andi32introduces an ambiguity inmain()where the type of the literal7cannot be determined. #98357 goes into why this is an error since it can be fixed by assigning a type (Foo) toprod, but this issue is about a regression in rustc 1.62 which drops information about the ambiguity in the literal integer's type from the error message/notes as compared to 1.61 (which does not).Playground link
The error message emitted by 1.61 (current stable):
The error message emitted by 1.62 (2022-06-13 1bc802e) (the current beta):
Notice that while one perhaps valid resolution has been provided, the actual cause of the error is completely obscured.