Silence some follow-up errors [3/x]#119818
Merged
bors merged 1 commit intorust-lang:masterfrom Jan 15, 2024
Merged
Conversation
Collaborator
|
(rustbot has picked a reviewer for you, use r? to override) |
tests/ui/impl-trait/issue-72911.rs
Outdated
| fn lint_files() -> impl Iterator<Item = foo::MissingItem> { | ||
| //~^ ERROR: failed to resolve | ||
| unimplemented!() | ||
| std::iter::empty() |
Contributor
There was a problem hiding this comment.
why did you change this test?
Contributor
Author
There was a problem hiding this comment.
because it otherwise emits a "(): Iterator does not hold" error
Contributor
There was a problem hiding this comment.
So this PR doesn't end up silencing errors, but also introducing new errors in some cases? 🤔 I think it may be important to note that.
Contributor
Author
There was a problem hiding this comment.
I reverted the change to show the diagnostic change
|
|
||
| if let ty::ClauseKind::Projection(projection) = predicate.kind().skip_binder() { | ||
| if projection.term.references_error() { | ||
| // No point on adding any obligations since there's a type error involved. |
Contributor
There was a problem hiding this comment.
Can you point me to the PR that added this originally?
estebank
approved these changes
Jan 10, 2024
d2a021f to
17bc6ca
Compare
This comment has been minimized.
This comment has been minimized.
These help silence follow up errors
17bc6ca to
fb44c84
Compare
compiler-errors
approved these changes
Jan 14, 2024
Contributor
|
@bors r+ |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 15, 2024
…3, r=compiler-errors Silence some follow-up errors [3/x] this is one piece of the requested cleanups from rust-lang#117449 Keep error types around, even in obligations. These help silence follow-up errors, as we now figure out that some types (most notably inference variables) are equal to an error type. But it also allows figuring out more types in the presence of errors, possibly causing more errors.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 15, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#119508 (coverage: Simplify building the coverage graph with `CoverageSuccessors`) - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119968 (Remove unused/unnecessary features) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 15, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119897 (`OutputTypeParameterMismatch` -> `SignatureMismatch`) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 15, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119897 (`OutputTypeParameterMismatch` -> `SignatureMismatch`) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 15, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119897 (`OutputTypeParameterMismatch` -> `SignatureMismatch`) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 15, 2024
Rollup merge of rust-lang#119818 - oli-obk:even_more_follow_up_errors3, r=compiler-errors Silence some follow-up errors [3/x] this is one piece of the requested cleanups from rust-lang#117449 Keep error types around, even in obligations. These help silence follow-up errors, as we now figure out that some types (most notably inference variables) are equal to an error type. But it also allows figuring out more types in the presence of errors, possibly causing more errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is one piece of the requested cleanups from #117449
Keep error types around, even in obligations.
These help silence follow-up errors, as we now figure out that some types (most notably inference variables) are equal to an error type.
But it also allows figuring out more types in the presence of errors, possibly causing more errors.