about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/middle/infer/error_reporting.rs1
-rw-r--r--src/librustc_front/fold.rs1
-rw-r--r--src/librustc_front/hir.rs2
-rw-r--r--src/librustc_front/lowering.rs4
-rw-r--r--src/librustc_front/print/pprust.rs5
-rw-r--r--src/librustc_front/visit.rs2
-rw-r--r--src/librustc_typeck/astconv.rs1
-rw-r--r--src/librustdoc/clean/mod.rs1
8 files changed, 4 insertions, 13 deletions
diff --git a/src/librustc/middle/infer/error_reporting.rs b/src/librustc/middle/infer/error_reporting.rs
index a16ef808bb6..835a96c6408 100644
--- a/src/librustc/middle/infer/error_reporting.rs
+++ b/src/librustc/middle/infer/error_reporting.rs
@@ -1444,7 +1444,6 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
                     hir::TyTup(tys) => {
                         hir::TyTup(tys.into_iter().map(|ty| build_to(ty, to)).collect())
                     }
-                    hir::TyParen(typ) => hir::TyParen(build_to(typ, to)),
                     other => other
                 };
                 hir::Ty { id: id, node: new_node, span: span }
diff --git a/src/librustc_front/fold.rs b/src/librustc_front/fold.rs
index 955de44b43f..b38aae240f5 100644
--- a/src/librustc_front/fold.rs
+++ b/src/librustc_front/fold.rs
@@ -382,7 +382,6 @@ pub fn noop_fold_ty<T: Folder>(t: P<Ty>, fld: &mut T) -> P<Ty> {
                     }))
                 }
                 TyTup(tys) => TyTup(tys.move_map(|ty| fld.fold_ty(ty))),
-                TyParen(ty) => TyParen(fld.fold_ty(ty)),
                 TyPath(qself, path) => {
                     let qself = qself.map(|QSelf { ty, position }| {
                         QSelf {
diff --git a/src/librustc_front/hir.rs b/src/librustc_front/hir.rs
index b017a07dde0..aa21c3ea042 100644
--- a/src/librustc_front/hir.rs
+++ b/src/librustc_front/hir.rs
@@ -848,8 +848,6 @@ pub enum Ty_ {
     TyObjectSum(P<Ty>, TyParamBounds),
     /// A type like `for<'a> Foo<&'a Bar>`
     TyPolyTraitRef(TyParamBounds),
-    /// No-op; kept solely so that we can pretty-print faithfully
-    TyParen(P<Ty>),
     /// Unused for now
     TyTypeof(P<Expr>),
     /// TyInfer means the type should be inferred instead of it having been
diff --git a/src/librustc_front/lowering.rs b/src/librustc_front/lowering.rs
index d13b92c04f8..0a591919822 100644
--- a/src/librustc_front/lowering.rs
+++ b/src/librustc_front/lowering.rs
@@ -225,7 +225,9 @@ pub fn lower_ty(_lctx: &LoweringContext, t: &Ty) -> P<hir::Ty> {
                 }))
             }
             TyTup(ref tys) => hir::TyTup(tys.iter().map(|ty| lower_ty(_lctx, ty)).collect()),
-            TyParen(ref ty) => hir::TyParen(lower_ty(_lctx, ty)),
+            TyParen(ref ty) => {
+                return lower_ty(_lctx, ty);
+            }
             TyPath(ref qself, ref path) => {
                 let qself = qself.as_ref().map(|&QSelf { ref ty, position }| {
                     hir::QSelf {
diff --git a/src/librustc_front/print/pprust.rs b/src/librustc_front/print/pprust.rs
index 2fd374f7560..002181c357b 100644
--- a/src/librustc_front/print/pprust.rs
+++ b/src/librustc_front/print/pprust.rs
@@ -506,11 +506,6 @@ impl<'a> State<'a> {
                 }
                 try!(self.pclose());
             }
-            hir::TyParen(ref typ) => {
-                try!(self.popen());
-                try!(self.print_type(&**typ));
-                try!(self.pclose());
-            }
             hir::TyBareFn(ref f) => {
                 let generics = hir::Generics {
                     lifetimes: f.lifetimes.clone(),
diff --git a/src/librustc_front/visit.rs b/src/librustc_front/visit.rs
index 94986ceced6..8307543958f 100644
--- a/src/librustc_front/visit.rs
+++ b/src/librustc_front/visit.rs
@@ -349,7 +349,7 @@ pub fn walk_variant<'v, V: Visitor<'v>>(visitor: &mut V,
 
 pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
     match typ.node {
-        TyVec(ref ty) | TyParen(ref ty) => {
+        TyVec(ref ty) => {
             visitor.visit_ty(ty)
         }
         TyPtr(ref mutable_type) => {
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 34378445c60..7de262dfa5b 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -1624,7 +1624,6 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
                              .collect();
             tcx.mk_tup(flds)
         }
-        hir::TyParen(ref typ) => ast_ty_to_ty(this, rscope, &**typ),
         hir::TyBareFn(ref bf) => {
             require_c_abi_if_variadic(tcx, &bf.decl, bf.abi, ast_ty.span);
             let bare_fn = ty_of_bare_fn(this, bf.unsafety, bf.abi, &*bf.decl);
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 34ddd5726d3..dbf71e431d4 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1606,7 +1606,6 @@ impl Clean<Type> for hir::Ty {
                 }
             }
             TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
-            TyParen(ref ty) => ty.clean(cx),
             TyPolyTraitRef(ref bounds) => {
                 PolyTraitRef(bounds.clean(cx))
             },