@@ -664,14 +664,6 @@ impl<I: Interner> AliasTerm<I> {
664
664
interner. parent ( self . def_id )
665
665
}
666
666
667
- /// Extracts the underlying trait reference and own args from this projection.
668
- /// For example, if this is a projection of `<T as StreamingIterator>::Item<'a>`,
669
- /// then this function would return a `T: StreamingIterator` trait reference and
670
- /// `['a]` as the own args.
671
- pub fn trait_ref_and_own_args ( self , interner : I ) -> ( TraitRef < I > , I :: GenericArgsSlice ) {
672
- interner. trait_ref_and_own_args_for_alias ( self . def_id , self . args )
673
- }
674
-
675
667
/// Extracts the underlying trait reference from this projection.
676
668
/// For example, if this is a projection of `<T as Iterator>::Item`,
677
669
/// then this function would return a `T: Iterator` trait reference.
@@ -680,14 +672,22 @@ impl<I: Interner> AliasTerm<I> {
680
672
/// consider calling [Self::trait_ref_and_own_args] to get those
681
673
/// as well.
682
674
pub fn trait_ref ( self , interner : I ) -> TraitRef < I > {
683
- self . trait_ref_and_own_args ( interner ) . 0
675
+ interner . trait_ref_for_alias ( self . def_id , self . args )
684
676
}
685
677
686
678
/// Extract the own args from this projection.
687
679
/// For example, if this is a projection of `<T as StreamingIterator>::Item<'a>`,
688
680
/// then this function would return the slice `['a]` as the own args.
689
681
pub fn own_args ( self , interner : I ) -> I :: GenericArgsSlice {
690
- self . trait_ref_and_own_args ( interner) . 1
682
+ interner. own_args_for_alias ( self . def_id , self . args )
683
+ }
684
+
685
+ /// Extracts the underlying trait reference and own args from this projection.
686
+ /// For example, if this is a projection of `<T as StreamingIterator>::Item<'a>`,
687
+ /// then this function would return a `T: StreamingIterator` trait reference and
688
+ /// `['a]` as the own args.
689
+ pub fn trait_ref_and_own_args ( self , interner : I ) -> ( TraitRef < I > , I :: GenericArgsSlice ) {
690
+ interner. trait_ref_and_own_args_for_alias ( self . def_id , self . args )
691
691
}
692
692
}
693
693
0 commit comments