Remove ty_bot from the type system

We now instead use a fresh variable for expressions that diverge.
This commit is contained in:
Jakub Bukaj 2014-10-24 21:14:37 +02:00
parent 58dc0a05ab
commit cca84e9e21
49 changed files with 802 additions and 643 deletions

View file

@ -880,6 +880,15 @@ impl Clean<FnDecl> for ast::FnDecl {
}
}
impl<'a> Clean<Type> for ty::FnOutput {
fn clean(&self, cx: &DocContext) -> Type {
match *self {
ty::FnConverging(ty) => ty.clean(cx),
ty::FnDiverging => Bottom
}
}
}
impl<'a> Clean<FnDecl> for (ast::DefId, &'a ty::FnSig) {
fn clean(&self, cx: &DocContext) -> FnDecl {
let (did, sig) = *self;
@ -1258,7 +1267,6 @@ impl Clean<Type> for ast::Ty {
impl Clean<Type> for ty::t {
fn clean(&self, cx: &DocContext) -> Type {
match ty::get(*self).sty {
ty::ty_bot => Bottom,
ty::ty_nil => Primitive(Unit),
ty::ty_bool => Primitive(Bool),
ty::ty_char => Primitive(Char),