diff options
| author | Andrew Cann <shum@canndrew.org> | 2016-07-31 22:33:41 +0800 |
|---|---|---|
| committer | Andrew Cann <shum@canndrew.org> | 2016-08-13 21:37:09 +0800 |
| commit | ed02344fbc7d3bed591f528304f603f9d320e919 (patch) | |
| tree | 00147b88e33ce6ce3a408c14491354c8f42aa76a /src/libsyntax | |
| parent | ee78f37e2a68120119dcda4312db0be3b545eabe (diff) | |
| download | rust-ed02344fbc7d3bed591f528304f603f9d320e919.tar.gz rust-ed02344fbc7d3bed591f528304f603f9d320e919.zip | |
Remove obsolete divergence related stuff
Replace FnOutput with Ty Replace FnConverging(ty) with ty Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
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)) |
