Skip to content

Commit

Permalink
remove unneeded fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed Feb 22, 2020
1 parent 9207a13 commit 7a6361f
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions src/librustc/ty/sty.rs
Expand Up @@ -254,41 +254,6 @@ pub enum TyKind<'tcx> {
Error,
}

impl<'tcx> TyKind<'tcx> {
pub fn article_and_description(&self) -> (&'static str, &'static str) {
match *self {
Bool => ("a", "boolean value"),
Char => ("a", "character"),
Int(..) => ("a", "signed interger"),
Uint(..) => ("an", "unsigned integer"),
Float(..) => ("a", "floating point number"),
Adt(..) => ("an", "abstract data type"),
Foreign(..) => ("a", "foreign type"),
Str => ("a", "string slice"),
Array(..) => ("an", "array"),
Slice(..) => ("a", "slice"),
RawPtr(..) => ("a", "raw pointer"),
Ref(..) => ("a", "reference"),
FnDef(..) => ("a", "function"),
FnPtr(..) => ("a", "function pointer"),
Dynamic(..) => ("a", "trait object"),
Closure(..) => ("a", "closure"),
Generator(..) => ("a", "generator"),
GeneratorWitness(..) => ("a", "generator witness"),
Never => ("a", "never"),
Tuple(..) => ("a", "tuple"),
Projection(..) => ("a", "projection"),
UnnormalizedProjection(..) => ("an", "unnormalized projection"),
Opaque(..) => ("an", "opaque type"),
Param(..) => ("a", "type parameter"),
Bound(..) => ("a", "bound type variable"),
Placeholder(..) => ("a", "universally quantified higher-ranked type"),
Infer(..) => ("an", "inference variable"),
Error => ("a", "type error"),
}
}
}

// `TyKind` is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(target_arch = "x86_64")]
static_assert_size!(TyKind<'_>, 24);
Expand Down

0 comments on commit 7a6361f

Please sign in to comment.