-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Uplift various *Predicate
types into rustc_type_ir
#125001
Uplift various *Predicate
types into rustc_type_ir
#125001
Conversation
r? lcnr |
r? @davidtwco rustbot has assigned @davidtwco. Use |
This comment has been minimized.
This comment has been minimized.
1af00cf
to
4474899
Compare
This comment has been minimized.
This comment has been minimized.
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
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.
r=me with or without nit applied
use rustc_type_ir::ClauseKind as IrClauseKind; | ||
use rustc_type_ir::CoercePredicate as IrCoercePredicate; | ||
use rustc_type_ir::ExistentialProjection as IrExistentialProjection; | ||
use rustc_type_ir::ExistentialTraitRef as IrExistentialTraitRef; | ||
use rustc_type_ir::NormalizesTo as IrNormalizesTo; | ||
use rustc_type_ir::PredicateKind as IrPredicateKind; | ||
use rustc_type_ir::ProjectionPredicate as IrProjectionPredicate; | ||
use rustc_type_ir::SubtypePredicate as IrSubtypePredicate; | ||
use rustc_type_ir::TraitPredicate as IrTraitPredicate; | ||
use rustc_type_ir::TraitRef as IrTraitRef; |
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.
use rustc_type_ir as ir;
and then use ir::ClauseKind
in the type defs 🤔
+ Hash | ||
+ Eq | ||
+ IntoIterator<Item = I::GenericArg> | ||
+ Deref<Target: Deref<Target = [I::GenericArg]>> |
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.
:/ Deref<Target: Deref<Target = [I::GenericArg]>>
is not ideal 🤔 don't have any immediate better ideas though
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.
Yes it extremely sucks and also is likely not going to work for r-a, but we should fix it later (either adapt the callsites that rely on this to do something else, or something idk).
please also update PR name |
TraitPredicate
*Predicate
types into rustc_type_ir
This comment has been minimized.
This comment has been minimized.
38e9e10
to
905f565
Compare
This comment has been minimized.
This comment has been minimized.
@bors r+ rollup=iffyy |
@bors rollup=iffy |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ee97564): 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: 676.399s -> 675.636s (-0.11%) |
Uplifts
ProjectionPredicate
,ExistentialTraitRef
,ExistentialProjection
,TraitPredicate
,NormalizesTo
,CoercePredicate
, andSubtypePredicate
.Adds
rustc_type_ir_macros
, which semi-duplicates the derive forTypeVisitable
,TypeFoldable
, andLift
, but in a way that is interner-agnostic.Moves
rustc_type_ir::trait_ref
torustc_type_ir::predicate
. The specific placement of all these structs doesn't matter b/c of glob imports, tho.