Remove Never variant from clean::Type enum
This commit is contained in:
parent
6df1d82869
commit
bdd34717b8
5 changed files with 6 additions and 8 deletions
|
|
@ -1313,7 +1313,7 @@ impl Clean<Type> for hir::Ty<'_> {
|
|||
use rustc_hir::*;
|
||||
|
||||
match self.kind {
|
||||
TyKind::Never => Never,
|
||||
TyKind::Never => Primitive(PrimitiveType::Never),
|
||||
TyKind::Ptr(ref m) => RawPointer(m.mutbl, box m.ty.clean(cx)),
|
||||
TyKind::Rptr(ref l, ref m) => {
|
||||
// There are two times a `Fresh` lifetime can be created:
|
||||
|
|
@ -1402,7 +1402,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
|
|||
trace!("cleaning type: {:?}", self);
|
||||
let ty = normalize(cx, self).unwrap_or(self);
|
||||
match *ty.kind() {
|
||||
ty::Never => Never,
|
||||
ty::Never => Primitive(PrimitiveType::Never),
|
||||
ty::Bool => Primitive(PrimitiveType::Bool),
|
||||
ty::Char => Primitive(PrimitiveType::Char),
|
||||
ty::Int(int_ty) => Primitive(int_ty.into()),
|
||||
|
|
|
|||
|
|
@ -1396,7 +1396,6 @@ crate enum Type {
|
|||
Slice(Box<Type>),
|
||||
/// The `String` field is about the size or the constant representing the array's length.
|
||||
Array(Box<Type>, String),
|
||||
Never,
|
||||
RawPointer(Mutability, Box<Type>),
|
||||
BorrowedRef {
|
||||
lifetime: Option<Lifetime>,
|
||||
|
|
@ -1462,7 +1461,6 @@ impl Type {
|
|||
}
|
||||
RawPointer(..) => Some(PrimitiveType::RawPointer),
|
||||
BareFunction(..) => Some(PrimitiveType::Fn),
|
||||
Never => Some(PrimitiveType::Never),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
@ -1550,7 +1548,6 @@ impl Type {
|
|||
}
|
||||
}
|
||||
BareFunction(..) => PrimitiveType::Fn,
|
||||
Never => PrimitiveType::Never,
|
||||
Slice(..) => PrimitiveType::Slice,
|
||||
Array(..) => PrimitiveType::Array,
|
||||
RawPointer(..) => PrimitiveType::RawPointer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue