Skip to content

multiple errors for the same problem #1803

Closed
@db48x

Description

@db48x

I've defined more than one impl for an interface, and they are all in scope at the moment. Here are the errors I get:

src/libcore/str.rs:695:4: 695:13 error: mismatched types: expected `u8` but found `char` (types differ)
src/libcore/str.rs:695     iter::all(s, { |c| r += escape_char(c); true });
                           ^~~~~~~~~
src/libcore/str.rs:695:4: 695:13 error: multiple applicable implementations in scope
src/libcore/str.rs:695     iter::all(s, { |c| r += escape_char(c); true });
                           ^~~~~~~~~
src/libcore/str.rs:695:4: 695:13 error: multiple applicable implementations in scope
src/libcore/str.rs:695     iter::all(s, { |c| r += escape_char(c); true });
                           ^~~~~~~~~
src/libcore/str.rs:695:4: 695:13 error: multiple applicable implementations in scope
src/libcore/str.rs:695     iter::all(s, { |c| r += escape_char(c); true });
                           ^~~~~~~~~
src/libcore/str.rs:1020:8: 1020:17 error: mismatched types: expected `u8` but found `char` (types differ)
src/libcore/str.rs:1020     ret iter::all(s, char::is_whitespace);
                                ^~~~~~~~~
src/libcore/str.rs:1020:8: 1020:17 error: multiple applicable implementations in scope
src/libcore/str.rs:1020     ret iter::all(s, char::is_whitespace);
                                ^~~~~~~~~
src/libcore/str.rs:1020:8: 1020:17 error: multiple applicable implementations in scope
src/libcore/str.rs:1020     ret iter::all(s, char::is_whitespace);
                                ^~~~~~~~~
src/libcore/str.rs:1020:8: 1020:17 error: multiple applicable implementations in scope
src/libcore/str.rs:1020     ret iter::all(s, char::is_whitespace);
                                ^~~~~~~~~

Notice that I got four errors for each of two call sites, and three of those four are identical.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions