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

Parallel execution may result in duplicate error messages #58965

Closed
Zoxc opened this issue Mar 6, 2019 · 1 comment
Closed

Parallel execution may result in duplicate error messages #58965

Zoxc opened this issue Mar 6, 2019 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parallel-queries Area: Parallel query execution C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Mar 6, 2019

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.

@Zoxc Zoxc added A-diagnostics Area: Messages for errors, warnings, and lints A-parallel-queries Area: Parallel query execution labels Mar 6, 2019
@crlf0710 crlf0710 added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 11, 2020
@estebank
Copy link
Contributor

estebank commented Aug 3, 2023

We only emit one of the errors now.

error[[E0275]](https://doc.rust-lang.org/stable/error_codes/E0275.html): overflow evaluating the requirement `<FooStruct as Foo>::A == _`
  --> src/main.rs:11:14
   |
11 |     type A = <FooStruct as Foo>::A;
   |              ^^^^^^^^^^^^^^^^^^^^^

@estebank estebank closed this as completed Aug 3, 2023
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 A-parallel-queries Area: Parallel query execution C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants