Skip to content

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

Closed
@nagisa

Description

@nagisa
Member
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.

Activity

added 2 commits that reference this issue on Dec 14, 2018

Rollup merge of rust-lang#56760 - estebank:dedup-bounds, r=oli-obk

65e7fe7

Rollup merge of rust-lang#56760 - estebank:dedup-bounds, r=oli-obk

9d5f554
added 2 commits that reference this issue on Dec 14, 2018

Rollup merge of rust-lang#56760 - estebank:dedup-bounds, r=oli-obk

9fa81f5

Rollup merge of rust-lang#56760 - estebank:dedup-bounds, r=oli-obk

e433da7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nagisa@Mark-Simulacrum

        Issue actions

          the method exists but the following trait bounds were not satisfied repeats the bounds multiple times · Issue #35677 · rust-lang/rust