diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-12 10:55:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-12 10:55:05 +0100 |
| commit | 632d8909a0dbf1c8f2569987b24d36dc013ed5e8 (patch) | |
| tree | 59bb0472525a4bc895123858047ece6616ae0c89 | |
| parent | a9c9a2c0484ceb8f6e8d6dc5cfa7b54e75f0019f (diff) | |
| parent | 8780ebff1f7468f0be64b81f81b72bce1301433a (diff) | |
| download | rust-632d8909a0dbf1c8f2569987b24d36dc013ed5e8.tar.gz rust-632d8909a0dbf1c8f2569987b24d36dc013ed5e8.zip | |
Rollup merge of #57434 - nnethercote:rm-CrateNum-Invalid, r=petrochenkov
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"), } |
