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

opaque type cleanup #112466

Merged
merged 3 commits into from
Jun 11, 2023
Merged

opaque type cleanup #112466

merged 3 commits into from
Jun 11, 2023

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jun 9, 2023

the commits are pretty self-contained.

r? @compiler-errors cc @oli-obk

lcnr added 3 commits June 9, 2023 14:48
be more explicit in where we only add new hidden types
and where we also have to deal with item bounds.
@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 9, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 9, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

// is responsible for proving these obligations.
let _ = obligations;
for &(key, ty) in opaque_types {
self.insert_hidden_type(key, param_env, ty)?;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was previously broken. register_hidden_type returns both obligations from checking the item bounds and from equating the added hidden type with the previous one. Can't be bothered to write a test for that though 😅 especially cause wf of opaque types is checked separately anyways ^^

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 9, 2023

📌 Commit b62e20d 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 Jun 9, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 9, 2023
…er-errors

opaque type cleanup

the commits are pretty self-contained.

r? `@compiler-errors` cc `@oli-obk`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 9, 2023
…er-errors

opaque type cleanup

the commits are pretty self-contained.

r? ``@compiler-errors`` cc ``@oli-obk``
@bors
Copy link
Contributor

bors commented Jun 11, 2023

⌛ Testing commit b62e20d with merge 34d64ab...

@bors
Copy link
Contributor

bors commented Jun 11, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 34d64ab to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 11, 2023
@bors bors merged commit 34d64ab into rust-lang:master Jun 11, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (34d64ab): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 648.85s -> 647.255s (-0.25%)

@lcnr lcnr deleted the opaque-type-cleanup branch June 11, 2023 09:47
Comment on lines +347 to +348
let opaque_ty_hir = tcx.hir().expect_item(opaque_type_key.def_id);
match opaque_ty_hir.expect_opaque_ty().origin {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have the is_type_alias_impl_trait query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants