]> git.lizzy.rs Git - rust.git/commitdiff
s/abstract_type_generics/opaque_type_generics/
authorNiko Matsakis <niko@alum.mit.edu>
Mon, 24 Jun 2019 19:17:48 +0000 (15:17 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 2 Jul 2019 16:25:22 +0000 (12:25 -0400)
src/librustc/infer/opaque_types/mod.rs

index 949e3eaf48fe94362fa14bb1d4a8f4b821685d0c..b1ede2ae2cd461e12ad97a2b64054413f43703c5 100644 (file)
@@ -333,7 +333,7 @@ pub fn constrain_opaque_type<FRR: FreeRegionRelations<'tcx>>(
 
         debug!("constrain_opaque_type: concrete_ty={:?}", concrete_ty);
 
-        let abstract_type_generics = tcx.generics_of(def_id);
+        let opaque_type_generics = tcx.generics_of(def_id);
 
         let span = tcx.def_span(def_id);
 
@@ -365,7 +365,7 @@ pub fn constrain_opaque_type<FRR: FreeRegionRelations<'tcx>>(
         // `['a]` for the first impl trait and `'b` for the
         // second.
         let mut least_region = None;
-        for param in &abstract_type_generics.params {
+        for param in &opaque_type_generics.params {
             match param.kind {
                 GenericParamDefKind::Lifetime => {}
                 _ => continue,
@@ -396,7 +396,7 @@ pub fn constrain_opaque_type<FRR: FreeRegionRelations<'tcx>>(
                         // regions that appear in the impl trait.
                         return self.generate_member_constraint(
                             concrete_ty,
-                            abstract_type_generics,
+                            opaque_type_generics,
                             opaque_defn,
                             def_id,
                             lr,
@@ -427,7 +427,7 @@ pub fn constrain_opaque_type<FRR: FreeRegionRelations<'tcx>>(
     fn generate_member_constraint(
         &self,
         concrete_ty: Ty<'tcx>,
-        abstract_type_generics: &ty::Generics,
+        opaque_type_generics: &ty::Generics,
         opaque_defn: &OpaqueTypeDecl<'tcx>,
         opaque_type_def_id: DefId,
         conflict1: ty::Region<'tcx>,
@@ -447,7 +447,7 @@ fn generate_member_constraint(
         // type can be equal to any of the region parameters of the
         // opaque type definition.
         let choice_regions: Lrc<Vec<ty::Region<'tcx>>> = Lrc::new(
-            abstract_type_generics
+            opaque_type_generics
                 .params
                 .iter()
                 .filter(|param| match param.kind {