Duplicate trait suggestion #92347
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: here
The current output is:
The code is incorrect and shouldn't compile, but the suggestion is to duplicate a trait restriction that is already present in the function and can be repeated n-times, e.g. with
T: std::ops::Shl<Output = T> + std::ops::Shl<Output = T>
it will suggestT: std::ops::Shl<Output = T> + std::ops::Shl<Output = T>+ std::ops::Shl<Output = T>
. This appears to indicate that the traits are not being checked correctly for suggestions, suggesting trait restrictions that are already present. The same output occurs in the nightly build.The text was updated successfully, but these errors were encountered: