diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-01-08 16:13:22 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-01-08 16:13:22 +1100 |
| commit | 8780ebff1f7468f0be64b81f81b72bce1301433a (patch) | |
| tree | 867634953d339dbb873fc52a2080888c805aebc4 | |
| parent | b92552d5578e4544006da0dd5e793a19c2149321 (diff) | |
| download | rust-8780ebff1f7468f0be64b81f81b72bce1301433a.tar.gz rust-8780ebff1f7468f0be64b81f81b72bce1301433a.zip | |
Remove `CrateNum::Invalid`.
It's unused.
| -rw-r--r-- | src/librustc/hir/def_id.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/librustc/hir/def_id.rs b/src/librustc/hir/def_id.rs index fb2c873d740..0a8c72a0ad8 100644 --- a/src/librustc/hir/def_id.rs +++ b/src/librustc/hir/def_id.rs @@ -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, @@ -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"), } @@ -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"), } |
