diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-05-23 11:11:20 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-06-01 12:12:26 -0700 |
| commit | eaa57cfb712e0e61bbc61d2309c0fa708f4f297b (patch) | |
| tree | 977bdbd8c7efe7aa1d81c04e2fe9447cf8384972 /src | |
| parent | d3cba254e464303a6495942f3a831c2bbd7f1768 (diff) | |
| download | rust-eaa57cfb712e0e61bbc61d2309c0fa708f4f297b.tar.gz rust-eaa57cfb712e0e61bbc61d2309c0fa708f4f297b.zip | |
`PolyTraitRef::self_ty` returns `Binder<Ty>`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_middle/ty/sty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_middle/ty/sty.rs b/src/librustc_middle/ty/sty.rs index f4962ced6c0..f01b9751c40 100644 --- a/src/librustc_middle/ty/sty.rs +++ b/src/librustc_middle/ty/sty.rs @@ -765,8 +765,8 @@ impl<'tcx> TraitRef<'tcx> { 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 { |
