Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the method exists but the following trait bounds were not satisfied repeats the bounds multiple times #35677

Closed
nagisa opened this issue Aug 15, 2016 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug.

Comments

@nagisa
Copy link
Member

nagisa commented Aug 15, 2016

use std::collections::HashMap;
fn intersect_map<K, V>(this: &mut HashMap<K, V>, other: HashMap<K, V>) -> bool {
    this.drain()
}

reports

note: the method `drain` exists but the following trait bounds were not satisfied: `K : std::cmp::Eq`, `K : std::hash::Hash`, `K : std::cmp::Eq`, `K : std::hash::Hash`

Note how it reports about K missing necessary bounds twice.

@Mark-Simulacrum Mark-Simulacrum added the A-diagnostics Area: Messages for errors, warnings, and lints label May 11, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 25, 2017
kennytm added a commit to kennytm/rust that referenced this issue Dec 14, 2018
kennytm added a commit to kennytm/rust that referenced this issue Dec 14, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this issue Dec 14, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this issue Dec 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants