Skip to content

Commit

Permalink
Rollup merge of rust-lang#57434 - nnethercote:rm-CrateNum-Invalid, r=…
Browse files Browse the repository at this point in the history
…petrochenkov

Remove `CrateNum::Invalid`.

It's unused.
  • Loading branch information
Centril committed Jan 12, 2019
2 parents a9c9a2c + 8780ebf commit 632d890
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/librustc/hir/def_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ pub enum CrateNum {
// FIXME(jseyfried): this is also used for custom derives until proc-macro crates get
// `CrateNum`s.
BuiltinMacros,
/// A CrateNum value that indicates that something is wrong.
Invalid,
/// A special CrateNum that we use for the tcx.rcache when decoding from
/// the incr. comp. cache.
ReservedForIncrCompCache,
Expand All @@ -29,7 +27,6 @@ impl ::std::fmt::Debug for CrateNum {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
CrateNum::Index(id) => write!(fmt, "crate{}", id.private),
CrateNum::Invalid => write!(fmt, "invalid crate"),
CrateNum::BuiltinMacros => write!(fmt, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(fmt, "crate for decoding incr comp cache"),
}
Expand Down Expand Up @@ -90,7 +87,6 @@ impl fmt::Display for CrateNum {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
CrateNum::Index(id) => fmt::Display::fmt(&id.private, f),
CrateNum::Invalid => write!(f, "invalid crate"),
CrateNum::BuiltinMacros => write!(f, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(f, "crate for decoding incr comp cache"),
}
Expand Down

0 comments on commit 632d890

Please sign in to comment.