]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_middle/ty/sty.rs
Rollup merge of #73059 - lcnr:outdated-comment, r=matthewjasper
[rust.git] / src / librustc_middle / ty / sty.rs
index 32a685297122b7d665447e74e7a4e80a8e97f5b1..5d4c2a54267c37d297ef0616330c2e23bc80c63e 100644 (file)
@@ -761,8 +761,8 @@ pub fn from_method(
 pub type PolyTraitRef<'tcx> = Binder<TraitRef<'tcx>>;
 
 impl<'tcx> PolyTraitRef<'tcx> {
-    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())
     }
 
     pub fn def_id(&self) -> DefId {