-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Don't wf-check non-local RPITs #107038
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Don't wf-check non-local RPITs #107038
Conversation
aa17359
to
9793abc
Compare
@@ -404,6 +404,7 @@ define_tables! { | |||
proc_macro: Table<DefIndex, MacroKind>, | |||
module_reexports: Table<DefIndex, LazyArray<ModChild>>, | |||
deduced_param_attrs: Table<DefIndex, LazyArray<DeducedParamAttrs>>, | |||
is_type_alias_impl_trait: Table<DefIndex, LazyValue<bool>>, |
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.
is_type_alias_impl_trait: Table<DefIndex, LazyValue<bool>>, | |
is_type_alias_impl_trait: Table<DefIndex, ()>, |
we usually don't encode false
, and just use the lack of an entry for that
@bors r+ p=5 let's land this now and figure out the encoding nit later |
Encoding nit addressed @bors r=oli-obk |
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.
Thanks for the quick turn around on this @compiler-errors!
☀️ Test successful - checks-actions |
Finished benchmarking commit (4c83bd0): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
CyclesResultsThis 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.
|
…mulacrum [beta] backport * Don't wf-check non-local RPITs rust-lang#107038 * Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error" rust-lang#107133 * bump bootstrap 1.66.1 r? `@Mark-Simulacrum`
We were using
ty::is_impl_trait_defn(..).is_none()
to check if we need to add WF obligations for an opaque type.This is supposed to be checking if the type is a TAIT, since RPITs' wfness is implied by wf checking its parent item, but since
is_impl_trait_defn
returnsNone
for non-local RPIT and async futures, we unnecessarily consider wf predicates for an RPIT if it is coming from a foreign crate.Fixes #107036
r? @oli-obk but feel free to reassign