Open
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)