File tree 2 files changed +18
-18
lines changed
2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -1086,24 +1086,6 @@ impl<'tcx> InstantiatedPredicates<'tcx> {
1086
1086
}
1087
1087
}
1088
1088
1089
- impl < ' tcx > TraitRef < ' tcx > {
1090
- pub fn new ( def_id : DefId , substs : & ' tcx Substs < ' tcx > ) -> TraitRef < ' tcx > {
1091
- TraitRef { def_id : def_id, substs : substs }
1092
- }
1093
-
1094
- pub fn self_ty ( & self ) -> Ty < ' tcx > {
1095
- self . substs . type_at ( 0 )
1096
- }
1097
-
1098
- pub fn input_types < ' a > ( & ' a self ) -> impl DoubleEndedIterator < Item =Ty < ' tcx > > + ' a {
1099
- // Select only the "input types" from a trait-reference. For
1100
- // now this is all the types that appear in the
1101
- // trait-reference, but it should eventually exclude
1102
- // associated types.
1103
- self . substs . types ( )
1104
- }
1105
- }
1106
-
1107
1089
/// When type checking, we use the `ParameterEnvironment` to track
1108
1090
/// details about the type/lifetime parameters that are in scope.
1109
1091
/// It primarily stores the bounds information.
Original file line number Diff line number Diff line change @@ -389,6 +389,24 @@ pub struct TraitRef<'tcx> {
389
389
pub substs : & ' tcx Substs < ' tcx > ,
390
390
}
391
391
392
+ impl < ' tcx > TraitRef < ' tcx > {
393
+ pub fn new ( def_id : DefId , substs : & ' tcx Substs < ' tcx > ) -> TraitRef < ' tcx > {
394
+ TraitRef { def_id : def_id, substs : substs }
395
+ }
396
+
397
+ pub fn self_ty ( & self ) -> Ty < ' tcx > {
398
+ self . substs . type_at ( 0 )
399
+ }
400
+
401
+ pub fn input_types < ' a > ( & ' a self ) -> impl DoubleEndedIterator < Item =Ty < ' tcx > > + ' a {
402
+ // Select only the "input types" from a trait-reference. For
403
+ // now this is all the types that appear in the
404
+ // trait-reference, but it should eventually exclude
405
+ // associated types.
406
+ self . substs . types ( )
407
+ }
408
+ }
409
+
392
410
pub type PolyTraitRef < ' tcx > = Binder < TraitRef < ' tcx > > ;
393
411
394
412
impl < ' tcx > PolyTraitRef < ' tcx > {
You can’t perform that action at this time.
0 commit comments