]> git.lizzy.rs Git - rust.git/commitdiff
Rename ObjectSum into TraitObject in AST/HIR
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Tue, 17 Jan 2017 07:41:44 +0000 (10:41 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Tue, 17 Jan 2017 07:41:44 +0000 (10:41 +0300)
13 files changed:
src/librustc/hir/intravisit.rs
src/librustc/hir/lowering.rs
src/librustc/hir/mod.rs
src/librustc/hir/print.rs
src/librustc_incremental/calculate_svh/svh_visitor.rs
src/librustc_passes/ast_validation.rs
src/librustc_typeck/astconv.rs
src/librustdoc/clean/mod.rs
src/libsyntax/ast.rs
src/libsyntax/fold.rs
src/libsyntax/parse/parser.rs
src/libsyntax/print/pprust.rs
src/libsyntax/visit.rs

index 001a5f6e586125e6423dcef5102144cf5276d644..7527d7fb318dddc543424d2012f25605e83f2af4 100644 (file)
@@ -566,7 +566,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
             visitor.visit_ty(ty);
             visitor.visit_nested_body(length)
         }
-        TyObjectSum(ref bounds) => {
+        TyTraitObject(ref bounds) => {
             walk_list!(visitor, visit_ty_param_bound, bounds);
         }
         TyImplTrait(ref bounds) => {
index ee6f91bd41493b9115b5a3a62554d18e40cb7971..57f40e7140e10d4e567d6a202f672c17e4a624a6 100644 (file)
@@ -317,8 +317,8 @@ fn lower_ty(&mut self, t: &Ty) -> P<hir::Ty> {
                     let expr = self.lower_expr(expr);
                     hir::TyTypeof(self.record_body(expr, None))
                 }
-                TyKind::ObjectSum(ref bounds) => {
-                    hir::TyObjectSum(self.lower_bounds(bounds))
+                TyKind::TraitObject(ref bounds) => {
+                    hir::TyTraitObject(self.lower_bounds(bounds))
                 }
                 TyKind::ImplTrait(ref bounds) => {
                     hir::TyImplTrait(self.lower_bounds(bounds))
index c3ae0e3f276c4ba25b77b215e66df9e399e19c27..b631d67e4736571d8097b309ed2d0efe90993543 100644 (file)
@@ -1216,7 +1216,7 @@ pub enum Ty_ {
     TyPath(QPath),
     /// A trait object type `Bound1 + Bound2 + Bound3`
     /// where `Bound` is a trait or a lifetime.
-    TyObjectSum(TyParamBounds),
+    TyTraitObject(TyParamBounds),
     /// An `impl Bound1 + Bound2 + Bound3` type
     /// where `Bound` is a trait or a lifetime.
     TyImplTrait(TyParamBounds),
index c314145721f1081c76a22237cf83924ef417212c..377f2ea26aba995da2e0da3fcf7e4112b4d7b68f 100644 (file)
@@ -418,7 +418,7 @@ pub fn print_type(&mut self, ty: &hir::Ty) -> io::Result<()> {
             hir::TyPath(ref qpath) => {
                 self.print_qpath(qpath, false)?
             }
-            hir::TyObjectSum(ref bounds) => {
+            hir::TyTraitObject(ref bounds) => {
                 self.print_bounds("", &bounds[..])?;
             }
             hir::TyImplTrait(ref bounds) => {
index c2abba5cce3f8e54391594df37e6f2fb470b1ada..f0e86e81c076d060e4c3a1a373949026f1d70259 100644 (file)
@@ -456,7 +456,7 @@ fn saw_ty(node: &Ty_) -> SawTyComponent {
       TyNever => SawTyNever,
       TyTup(..) => SawTyTup,
       TyPath(_) => SawTyPath,
-      TyObjectSum(..) => SawTyObjectSum,
+      TyTraitObject(..) => SawTyObjectSum,
       TyImplTrait(..) => SawTyImplTrait,
       TyTypeof(..) => SawTyTypeof,
       TyInfer => SawTyInfer
index e38fcbb5f6b05892ea248732906c0696e4a90617..b7b027102b2afbd3c999d85f74d9982725fb0277 100644 (file)
@@ -143,7 +143,7 @@ fn visit_ty(&mut self, ty: &'a Ty) {
                     err.emit();
                 });
             }
-            TyKind::ObjectSum(ref bounds) => {
+            TyKind::TraitObject(ref bounds) => {
                 self.no_questions_in_bounds(bounds, "trait object types", false);
             }
             _ => {}
index bcb82c85f2485b4c67c5a6e1db3974e89c6e5cfb..e4529b58f03ce9eeed248127ea8b8a1b0e87f248 100644 (file)
@@ -1347,7 +1347,7 @@ pub fn def_to_ty(&self,
         match path.def {
             Def::Trait(trait_def_id) => {
                 // N.B. this case overlaps somewhat with
-                // TyObjectSum, see that fn for details
+                // TyTraitObject, see that fn for details
 
                 assert_eq!(opt_self_ty, None);
                 tcx.prohibit_type_params(path.segments.split_last().unwrap().1);
@@ -1525,7 +1525,7 @@ pub fn ast_ty_to_ty(&self, rscope: &RegionScope, ast_ty: &hir::Ty) -> Ty<'tcx> {
                 }
                 tcx.mk_fn_ptr(bare_fn_ty)
             }
-            hir::TyObjectSum(ref bounds) => {
+            hir::TyTraitObject(ref bounds) => {
                 self.conv_object_ty_poly_trait_ref(rscope, ast_ty.span, bounds)
             }
             hir::TyImplTrait(ref bounds) => {
index 77ca6ef34b875f51ecf0867ca1da76fd1c26afea..a77485477b1591330dec2162217592e8ccadb12e 100644 (file)
@@ -1765,7 +1765,7 @@ fn clean(&self, cx: &DocContext) -> Type {
                     trait_: box resolve_type(cx, trait_path.clean(cx), self.id)
                 }
             }
-            TyObjectSum(ref bounds) => {
+            TyTraitObject(ref bounds) => {
                 let lhs_ty = bounds[0].clean(cx);
                 match lhs_ty {
                     TraitBound(poly_trait, ..) => {
index 2d7dfe50415d3f82f23df192e54315362d368d54..62cef26b6d1f50c0b431bf1fcae32e7d72f4c8a5 100644 (file)
@@ -1359,7 +1359,7 @@ pub enum TyKind {
     Path(Option<QSelf>, Path),
     /// A trait object type `Bound1 + Bound2 + Bound3`
     /// where `Bound` is a trait or a lifetime.
-    ObjectSum(TyParamBounds),
+    TraitObject(TyParamBounds),
     /// An `impl Bound1 + Bound2 + Bound3` type
     /// where `Bound` is a trait or a lifetime.
     ImplTrait(TyParamBounds),
index 2acf1c8f8fb4945d30dfcd866ce2fbc96aa41bfb..f936fc79991f7694a82c702dbc0d09973af28320 100644 (file)
@@ -386,8 +386,8 @@ pub fn noop_fold_ty<T: Folder>(t: P<Ty>, fld: &mut T) -> P<Ty> {
             TyKind::Typeof(expr) => {
                 TyKind::Typeof(fld.fold_expr(expr))
             }
-            TyKind::ObjectSum(bounds) => {
-                TyKind::ObjectSum(bounds.move_map(|b| fld.fold_ty_param_bound(b)))
+            TyKind::TraitObject(bounds) => {
+                TyKind::TraitObject(bounds.move_map(|b| fld.fold_ty_param_bound(b)))
             }
             TyKind::ImplTrait(bounds) => {
                 TyKind::ImplTrait(bounds.move_map(|b| fld.fold_ty_param_bound(b)))
index 60ad6a76f4d28d242c2647c68145d1efe44f8d7c..62897159bf0c62fb1fe3935ab6fa388d215272c4 100644 (file)
@@ -1045,7 +1045,7 @@ pub fn parse_for_in_type(&mut self) -> PResult<'a, TyKind> {
                 Some(TraitTyParamBound(poly_trait_ref, TraitBoundModifier::None)).into_iter()
                 .chain(other_bounds)
                 .collect();
-            Ok(ast::TyKind::ObjectSum(all_bounds))
+            Ok(ast::TyKind::TraitObject(all_bounds))
         }
     }
 
@@ -1327,7 +1327,7 @@ pub fn parse_ty(&mut self) -> PResult<'a, P<Ty>> {
         }
 
         let sp = mk_sp(lo, self.prev_span.hi);
-        let sum = TyKind::ObjectSum(bounds);
+        let sum = TyKind::TraitObject(bounds);
         Ok(P(Ty {id: ast::DUMMY_NODE_ID, node: sum, span: sp}))
     }
 
index c989aa59e8717ba7810bdb532b2bcfa0ae5aedbc..7115a38b448068e6225bee27f0d88e9e68d23190 100644 (file)
@@ -1028,7 +1028,7 @@ pub fn print_type(&mut self, ty: &ast::Ty) -> io::Result<()> {
             ast::TyKind::Path(Some(ref qself), ref path) => {
                 self.print_qpath(path, qself, false)?
             }
-            ast::TyKind::ObjectSum(ref bounds) => {
+            ast::TyKind::TraitObject(ref bounds) => {
                 self.print_bounds("", &bounds[..])?;
             }
             ast::TyKind::ImplTrait(ref bounds) => {
index b0d7a2518036fccff1cdd2df296550b7e875fc2e..1a95e672f3c73acfb433c74aa1217005eb20cf6b 100644 (file)
@@ -346,7 +346,7 @@ pub fn walk_ty<'a, V: Visitor<'a>>(visitor: &mut V, typ: &'a Ty) {
             visitor.visit_ty(ty);
             visitor.visit_expr(expression)
         }
-        TyKind::ObjectSum(ref bounds) => {
+        TyKind::TraitObject(ref bounds) => {
             walk_list!(visitor, visit_ty_param_bound, bounds);
         }
         TyKind::ImplTrait(ref bounds) => {