Regression in error reporting on {integer} type ambiguity between 1.61 and 1.62 #98404
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
This is strongly related to #98357.
The presence of a
Mul
impl for bothu8
andi32
introduces an ambiguity inmain()
where the type of the literal7
cannot 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.
The text was updated successfully, but these errors were encountered: