-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.T-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.
Description
As described in #67642 (comment) when one attempts to call a triat method with unsatisfied bounds, the message says the method doesn't exist instead of explaining that the bounds weren't satisfied.
I tried this code:
use std::collections::HashMap;
struct Foo;
fn main() {
let a: HashMap<Foo, String> = HashMap::default();
let mut b: HashMap<Foo, String> = HashMap::default();
b.extend(a);
}
I expected to see this happen: Rustc message saying that Eq
and Hash
aren't satisfied.
Instead, this happened: Rustc says that extend
doesn't exist.
Meta
The bug is in nightly
Tested on the playground:
1.44.0-nightly (2020-04-22 b2e36e6c2d229126b59e)
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.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.T-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.