impl has stricter requirements than trait
for async fn in traits also incorrectly suggests adding trait bound that already exists
#122506
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
which returns the following errors:
impl has stricter requirements than trait
is the correct error and hint here, should thefuture cannot be sent between threads safely
error be surfaced in this case given it's not real cause and it suggests to add a bound that already exists making the output just more confusing.Meta
This happens on both beta and nightly.
In stable E0276 doesn't even appear at all and it only gives the first error + hint
rustc --version --verbose
: (nightly)rustc --version --verbose
: (beta)The text was updated successfully, but these errors were encountered: