-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make PolyTraitRef::self_ty
return Binder<Ty>
#72508
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
Conversation
PolyTraitPredicate::self_ty
return Binder<Ty>
PolyTraitRef::self_ty
return Binder<Ty>
pub fn self_ty(&self) -> Ty<'tcx> { | ||
self.skip_binder().self_ty() | ||
pub fn self_ty(&self) -> Binder<Ty<'tcx>> { | ||
self.map_bound_ref(|tr| tr.self_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.
yay
@@ -289,7 +289,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { | |||
( | |||
Some(format!( | |||
"`?` couldn't convert the error to `{}`", | |||
trait_ref.self_ty(), | |||
trait_ref.skip_binder().self_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.
"Less yay" -- this seems ok for now I guess but I wish we had a different solution than skipping the binder
@bors r+ |
📌 Commit 09cd547 has been approved by |
…matsakis Make `PolyTraitRef::self_ty` return `Binder<Ty>` This came up during review of rust-lang#71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of rust-lang#72507.
failed in rollup ci check @bors r- |
09cd547
to
b4e06b9
Compare
@bors retry |
@bors r=nikomatsakis |
📌 Commit b4e06b9 has been approved by |
⌛ Testing commit b4e06b9 with merge 0372fd6c280a1a0b743a22403c39bb95daebf364... |
@bors retry yield |
…matsakis Make `PolyTraitRef::self_ty` return `Binder<Ty>` This came up during review of rust-lang#71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of rust-lang#72507.
…matsakis Make `PolyTraitRef::self_ty` return `Binder<Ty>` This came up during review of rust-lang#71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of rust-lang#72507.
Could this have caused #73043 (comment)? I can't see a direct connection, and the panic unfortunately doesn't have a useful line number, but the other changes in that rollup seem even less likely to be the culprit. |
Hm, probably it's not this one, as #73053 has the same failure. |
…matsakis Make `PolyTraitRef::self_ty` return `Binder<Ty>` This came up during review of rust-lang#71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of rust-lang#72507.
…matsakis Make `PolyTraitRef::self_ty` return `Binder<Ty>` This came up during review of rust-lang#71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of rust-lang#72507.
Rollup of 3 pull requests Successful merges: - rust-lang#71796 (de-promote Duration::from_secs) - rust-lang#72508 (Make `PolyTraitRef::self_ty` return `Binder<Ty>`) - rust-lang#72708 (linker: Add a linker rerun hack for gcc versions not supporting -static-pie) Failed merges: r? @ghost
…matsakis Make `PolyTraitRef::self_ty` return `Binder<Ty>` This came up during review of rust-lang#71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of rust-lang#72507.
This came up during review of #71618. The current implementation is the same as a call to
skip_binder
but harder to audit. Make it preserve binding levels and add a call toskip_binder
at all use sites so they can be audited as part of #72507.