-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
opaque type cleanup #112466
Conversation
be more explicit in where we only add new hidden types and where we also have to deal with item bounds.
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)?; |
There was a problem hiding this comment.
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 ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof
@bors r+ |
…er-errors opaque type cleanup the commits are pretty self-contained. r? `@compiler-errors` cc `@oli-obk`
…er-errors opaque type cleanup the commits are pretty self-contained. r? ``@compiler-errors`` cc ``@oli-obk``
☀️ Test successful - checks-actions |
Finished benchmarking commit (34d64ab): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 648.85s -> 647.255s (-0.25%) |
let opaque_ty_hir = tcx.hir().expect_item(opaque_type_key.def_id); | ||
match opaque_ty_hir.expect_opaque_ty().origin { |
There was a problem hiding this comment.
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
the commits are pretty self-contained.
r? @compiler-errors cc @oli-obk