Skip to content

Parallel execution may result in duplicate error messages #58965

Closed
@Zoxc

Description

@Zoxc

When executing parallel blocks we'll reveal more error messages because we don't immediately stop at the first fatal one. This may lead to duplicate error messages however. For example src/test/ui/issues/issue-21946.rs the from test suite:

trait Foo {
    type A;
}

struct FooStruct;

impl Foo for FooStruct {
//~^ ERROR overflow evaluating the requirement `<FooStruct as Foo>::A`
    type A = <FooStruct as Foo>::A;
    //~^ ERROR overflow evaluating the requirement `<FooStruct as Foo>::A`
}

fn main() {}

Produces:

error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A`
  --> $DIR/issue-21946.rs:7:6
   |
LL | impl Foo for FooStruct {
   |      ^^^

error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A`
  --> $DIR/issue-21946.rs:9:5
   |
LL |     type A = <FooStruct as Foo>::A;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0275`.

We should look into deduplicating these error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions