-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add some needed comments in adjust_fulfillment_errors.rs
#115289
Conversation
&& let ty::Param(_param) = ty.kind() | ||
&& let Some(arg) = predicate_args.get(0) | ||
&& let ty::GenericArgKind::Type(arg_ty) = arg.unpack() | ||
&& arg_ty == 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.
These last four &&
s are either redundant (by construction of predicate_args
) or unneeded (checking if it's a param), so I just folded it into the match above.
&& self.point_at_generic_if_possible(error, def_id, param, segment) | ||
{ | ||
// HACK: This is not correct, since `predicate_self_type_to_point_at` might |
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 shouldn't matter in practice, but I think it's important to note, since it can lead to weird diagnostics depending on how the FunctionArgumentObligation
is used.
ty::AliasKind::Projection | ty::AliasKind::Weak, | ||
ty::AliasTy { args, def_id, .. }, | ||
) = ty.kind() | ||
// NOTE: These obligations are 100% redundant and are implied by |
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.
Want to note that this can be removed in the future, since they're not here for correctness.
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (af78bae): 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: 633.02s -> 631.926s (-0.17%) |
r? @estebank