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

remove unnecessary check for opaque types #107074

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jan 19, 2023

this isn't needed and may hide some errors.

after analysis there are no opaque types so it's a noop anyways

before analysis there are opaque types but due to Reveal::UserFacing we don't reveal them. is_subtype simply discards the opaque type constraints as these will get checked again during mir borrowck.

r? types

want to land this after the beta-cutoff as mir validator changes are apparently pretty scary

@rustbot 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 Jan 19, 2023
@lcnr lcnr marked this pull request as ready for review January 19, 2023 15:09
@compiler-errors
Copy link
Member

r? @compiler-errors

r=me after beta branches (tomorrow?)

@compiler-errors
Copy link
Member

Nightly has branched

@bors r+

@bors
Copy link
Contributor

bors commented Jan 26, 2023

📌 Commit 0accf08 has been approved by compiler-errors

It is now in the queue for this repository.

@bors 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 26, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 26, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#97373 (impl DispatchFromDyn for Cell and UnsafeCell)
 - rust-lang#106625 (Remove backwards compat for LLVM 12 coverage format)
 - rust-lang#106779 (Avoid __cxa_thread_atexit_impl on Emscripten)
 - rust-lang#106811 (Append .dwp to the binary filename instead of replacing the existing extension.)
 - rust-lang#106836 (Remove optimistic spinning from `mpsc::SyncSender`)
 - rust-lang#106946 (implement Hash for proc_macro::LineColumn)
 - rust-lang#107074 (remove unnecessary check for opaque types)
 - rust-lang#107287 (Improve fn pointer notes)
 - rust-lang#107304 (Use `can_eq` to compare types for default assoc type error)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@lcnr
Copy link
Contributor Author

lcnr commented Jan 26, 2023

So one way we could get issues here is that equate may emit nested obligations which can require auto traits for opaques which could end up creating cycles 🤔 though we have the same impl to relate stuff in mir borrowck where we would still get cycles so this shouldn't cause any problems.

@bors bors merged commit c1d722c into rust-lang:master Jan 26, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 26, 2023
@lcnr lcnr deleted the validate-dont-skip-opaque branch January 26, 2023 13:12
lcnr added a commit to lcnr/rust that referenced this pull request Feb 10, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 10, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Feb 11, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2023
Rollup of 9 pull requests

Successful merges:

 - rust-lang#105019 (Add parentheses properly for borrowing suggestion)
 - rust-lang#106001 (Stop at the first `NULL` argument when iterating `argv`)
 - rust-lang#107098 (Suggest function call on pattern type mismatch)
 - rust-lang#107490 (rustdoc: remove inconsistently-present sidebar tooltips)
 - rust-lang#107855 (Add a couple random projection tests for new solver)
 - rust-lang#107857 (Add ui test for implementation on projection)
 - rust-lang#107878 (Clarify `new_size` for realloc means bytes)
 - rust-lang#107888 (revert rust-lang#107074, add regression test)
 - rust-lang#107900 (Zero the `REPARSE_MOUNTPOINT_DATA_BUFFER` header)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants