-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Prefer non-[type error]
candidates during selection
#106309
Merged
bors
merged 2 commits into
rust-lang:master
from
compiler-errors:prefer-non-err-candidates
Jan 12, 2023
Merged
Prefer non-[type error]
candidates during selection
#106309
bors
merged 2 commits into
rust-lang:master
from
compiler-errors:prefer-non-err-candidates
Jan 12, 2023
Conversation
This file contains 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
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 30, 2022
compiler-errors
force-pushed
the
prefer-non-err-candidates
branch
from
January 1, 2023 23:48
11e6fa3
to
b6cbd21
Compare
compiler-errors
force-pushed
the
prefer-non-err-candidates
branch
from
January 1, 2023 23:51
b6cbd21
to
db6d3b3
Compare
Nice! @bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 9, 2023
JohnTitor
pushed a commit
to JohnTitor/rust
that referenced
this pull request
Jan 9, 2023
…didates, r=oli-obk Prefer non-`[type error]` candidates during selection Fixes rust-lang#102130 Fixes rust-lang#106351 r? types note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during `match_impl`, I think.
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this pull request
Jan 9, 2023
…didates, r=oli-obk Prefer non-`[type error]` candidates during selection Fixes rust-lang#102130 Fixes rust-lang#106351 r? types note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during `match_impl`, I think.
@bors r- |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Jan 9, 2023
compiler-errors
force-pushed
the
prefer-non-err-candidates
branch
from
January 11, 2023 20:14
db6d3b3
to
83fbc71
Compare
Rebased @bors r=oli-obk |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Jan 11, 2023
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Jan 12, 2023
…didates, r=oli-obk Prefer non-`[type error]` candidates during selection Fixes rust-lang#102130 Fixes rust-lang#106351 r? types note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during `match_impl`, I think.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 12, 2023
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#106167 (Fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311) - rust-lang#106309 (Prefer non-`[type error]` candidates during selection) - rust-lang#106532 (Allow codegen to unsize `dyn*` to `dyn`) - rust-lang#106596 (Hide more of long types in E0271) - rust-lang#106638 (std tests: use __OsLocalKeyInner from realstd) - rust-lang#106676 (Test that we cannot use trait impl methods arguments as defining uses) - rust-lang#106702 (Conserve cause of `ImplDerivedObligation` in E0599) - rust-lang#106732 (rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors.) - rust-lang#106733 (Revert "warn newer available version of the x tool") - rust-lang#106748 (Clean up `OnUnimplementedFormatString::verify`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jan 23, 2023
…etrochenkov Filter param-env predicates for errors before calling `to_opt_poly_trait_pred` cc rust-lang#106309 rust-lang#106757 (comment) r? `@ghost`
This was referenced Jul 11, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jul 25, 2023
…b-naber Don't say that a type is uncallable if its fn signature has errors in it This is fallout from rust-lang#106309, where we don't consider param-env candidates that reference errors because they unify with everything. This means, however, that we don't consider an APIT like `impl Fn(MissingType)` isn't considered to implement `Fn`, for example. We can double-check that with a weaker heuristic [`extract_callable_info`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_typeck/fn_ctxt/struct.FnCtxt.html#method.extract_callable_info), and suppress the knock-down error using that. Fixes rust-lang#113566
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Oct 24, 2024
…, r=lcnr,estebank Consider param-env candidates even if they have errors I added this logic in rust-lang#106309, but frankly I don't know why -- the logic was a very large hammer. It seems like recent changes to error tainting has made that no longer necessary. Ideally we'd rework the way we handle error reporting in all of candidate assembly to be a bit more responsible; we're just suppressing candidates all willy-nilly and it leads to mysterious *other* errors cropping up, like the one that rust-lang#132082 originally wanted to fix. **N.B.** This has the side-effect of turning a failed resolution like `where Missing: Sized` into a trivial where clause that matches all types, but also I don't think it really matters? I'm putting this up as an alternative to rust-lang#132082, since that PR doesn't address the case when one desugars the APIT into a regular type param. r? lcnr vibeck
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 24, 2024
Rollup merge of rust-lang#132084 - compiler-errors:param-env-with-err, r=lcnr,estebank Consider param-env candidates even if they have errors I added this logic in rust-lang#106309, but frankly I don't know why -- the logic was a very large hammer. It seems like recent changes to error tainting has made that no longer necessary. Ideally we'd rework the way we handle error reporting in all of candidate assembly to be a bit more responsible; we're just suppressing candidates all willy-nilly and it leads to mysterious *other* errors cropping up, like the one that rust-lang#132082 originally wanted to fix. **N.B.** This has the side-effect of turning a failed resolution like `where Missing: Sized` into a trivial where clause that matches all types, but also I don't think it really matters? I'm putting this up as an alternative to rust-lang#132082, since that PR doesn't address the case when one desugars the APIT into a regular type param. r? lcnr vibeck
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Fixes #102130
Fixes #106351
r? types
note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during
match_impl
, I think.