-
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
Cleanup some EarlyBinder::skip_binder()
-> EarlyBinder::subst_identity()
#112220
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,10 +104,10 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> { | |
// the post-inference `trait_ref`, as it's more accurate. | ||
trait_: Some(clean_trait_ref_with_bindings( | ||
cx, | ||
ty::Binder::dummy(trait_ref.skip_binder()), | ||
ty::Binder::dummy(trait_ref.subst_identity()), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are some There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I believe so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, just updated the commit to add those 👍 |
||
ThinVec::new(), | ||
)), | ||
for_: clean_middle_ty(ty::Binder::dummy(ty.skip_binder()), cx, None), | ||
for_: clean_middle_ty(ty::Binder::dummy(ty.subst_identity()), cx, None), | ||
items: cx | ||
.tcx | ||
.associated_items(impl_def_id) | ||
|
@@ -116,7 +116,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> { | |
.collect::<Vec<_>>(), | ||
polarity: ty::ImplPolarity::Positive, | ||
kind: ImplKind::Blanket(Box::new(clean_middle_ty( | ||
ty::Binder::dummy(trait_ref.skip_binder().self_ty()), | ||
ty::Binder::dummy(trait_ref.subst_identity().self_ty()), | ||
cx, | ||
None, | ||
))), | ||
|
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.
I remember a similar pattern in
Instance::subst_mir
that I usedskip_binder
for previously:rust/compiler/rustc_middle/src/ty/instance.rs
Lines 581 to 591 in a9baa16
Should that one also be
subst_identity()
?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, probably