-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rename some FulfillmentErrorCode
/ObligationCauseCode
variants to be less redundant
#124952
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
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor changes to the core type system |
FulfillmentErrorCode
/ObligationCauseCode
variants to be less redundant
@@ -256,20 +249,20 @@ pub enum ObligationCauseCode<'tcx> { | |||
|
|||
/// Must satisfy all of the where-clause predicates of the | |||
/// given item. | |||
ItemObligation(DefId), | |||
MiscItem(DefId), |
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.
Alternative could be WhereClause
, and then SpannedWhereClause
, etc.
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.
Actually, I actually like WhereClause
better
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.
same suggestons, otherwise r=me
WhereClause(DefId), | ||
|
||
/// Like `ItemObligation`, but carries the span of the | ||
/// Like `WhereClause`, but carries the span of the | ||
/// predicate when it can be identified. | ||
BindingObligation(DefId, Span), | ||
SpannedWhereClause(DefId, Span), |
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.
could you instead change this to WhereClause(DefId, Option<Span>)
? and change the matches to WhereClause(whatever, Some(span))
?
WhereClauseInExpr(DefId, HirId, usize), | ||
|
||
/// Combines `ExprItemObligation` and `BindingObligation`. | ||
ExprBindingObligation(DefId, Span, HirId, usize), | ||
/// Combines `SpannedWhereClause` and `WhereClauseInExpr`. | ||
SpannedWhereClauseInExpr(DefId, Span, HirId, usize), |
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.
same here
☔ The latest upstream changes (presumably #124961) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=lcnr rollup p=1 (bitrotty) |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2cce088): 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.
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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 676.223s -> 673.906s (-0.34%) |
FulfillmentErrorCode
variants.ObligationCauseCode::
to prefix a code, rather than using a glob import and naming them throughtraits::
.ObligationCauseCode
variants -- I wasn't particularly thorough with thinking of a new names for these, so could workshop them if necessary.r? lcnr