diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/fold.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 6 |
3 files changed, 0 insertions, 11 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 6ba5eccc5cf..9046a44fdc6 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1567,9 +1567,6 @@ impl fmt::Debug for ImplPolarity { #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum FunctionRetTy { - /// Functions with return type `!`that always - /// raise an error or exit (i.e. never return to the caller) - None(Span), /// Return type is not specified. /// /// Functions default to `()` and @@ -1583,7 +1580,6 @@ pub enum FunctionRetTy { impl FunctionRetTy { pub fn span(&self) -> Span { match *self { - FunctionRetTy::None(span) => span, FunctionRetTy::Default(span) => span, FunctionRetTy::Ty(ref ty) => ty.span, } diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index 47addd8aba5..6c5cbdc645a 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -638,7 +638,6 @@ pub fn noop_fold_fn_decl<T: Folder>(decl: P<FnDecl>, fld: &mut T) -> P<FnDecl> { output: match output { FunctionRetTy::Ty(ty) => FunctionRetTy::Ty(fld.fold_ty(ty)), FunctionRetTy::Default(span) => FunctionRetTy::Default(span), - FunctionRetTy::None(span) => FunctionRetTy::None(span), }, variadic: variadic }) diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 6214dc5301b..a5d512f14ec 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2696,10 +2696,6 @@ impl<'a> State<'a> { self.maybe_print_comment(ty.span.lo) } ast::FunctionRetTy::Default(..) => unreachable!(), - ast::FunctionRetTy::None(span) => { - try!(self.word_nbsp("!")); - self.maybe_print_comment(span.lo) - } } } @@ -2955,8 +2951,6 @@ impl<'a> State<'a> { try!(self.ibox(INDENT_UNIT)); try!(self.word_space("->")); match decl.output { - ast::FunctionRetTy::None(_) => - try!(self.word_nbsp("!")), ast::FunctionRetTy::Default(..) => unreachable!(), ast::FunctionRetTy::Ty(ref ty) => try!(self.print_type(&ty)) |
