Skip to content

Duplicate Errors #16966

@reem

Description

@reem

Rustc sometimes recognizes and logs the same error multiple times.

Test case: https://gist.github.com/reem/78db1ad233f1c87f9ca7

rustc --test consistently logs (note the double report on the L#33 error):

lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
lib.rs:33     replace_map(b, double);
              ^~~~~~~~~~~
lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
lib.rs:33     replace_map(b, double);
              ^~~~~~~~~~~
lib.rs:36:5: 36:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
lib.rs:36     replace_map(b, |&mut: x: uint| x * 2);
              ^~~~~~~~~~~
lib.rs:39:5: 39:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
lib.rs:39     replace_map(b, |&: x: uint| x * 2);
              ^~~~~~~~~~~
error: aborting due to 4 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions