Remove unused FileName::CfgSpec.

This commit is contained in:
Nicholas Nethercote 2023-10-04 15:37:44 +11:00
parent 442a66d385
commit 108e541cc2
2 changed files with 1 additions and 7 deletions

View File

@ -813,7 +813,6 @@ pub fn opt_path(&self) -> Option<&Path> {
FileName::Anon(_) => None, FileName::Anon(_) => None,
FileName::MacroExpansion(_) => None, FileName::MacroExpansion(_) => None,
FileName::ProcMacroSourceCode(_) => None, FileName::ProcMacroSourceCode(_) => None,
FileName::CfgSpec(_) => None,
FileName::CliCrateAttr(_) => None, FileName::CliCrateAttr(_) => None,
FileName::Custom(_) => None, FileName::Custom(_) => None,
FileName::DocTest(path, _) => Some(path), FileName::DocTest(path, _) => Some(path),

View File

@ -280,8 +280,7 @@ pub fn to_string_lossy(&self, display_pref: FileNameDisplayPreference) -> Cow<'_
} }
/// Differentiates between real files and common virtual files. /// Differentiates between real files and common virtual files.
#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash, Decodable, Encodable)]
#[derive(Decodable, Encodable)]
pub enum FileName { pub enum FileName {
Real(RealFileName), Real(RealFileName),
/// Call to `quote!`. /// Call to `quote!`.
@ -292,8 +291,6 @@ pub enum FileName {
// FIXME(jseyfried) // FIXME(jseyfried)
MacroExpansion(Hash64), MacroExpansion(Hash64),
ProcMacroSourceCode(Hash64), ProcMacroSourceCode(Hash64),
/// Strings provided as `--cfg [cfgspec]` stored in a `crate_cfg`.
CfgSpec(Hash64),
/// Strings provided as crate attributes in the CLI. /// Strings provided as crate attributes in the CLI.
CliCrateAttr(Hash64), CliCrateAttr(Hash64),
/// Custom sources for explicit parser calls from plugins and drivers. /// Custom sources for explicit parser calls from plugins and drivers.
@ -339,7 +336,6 @@ fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
MacroExpansion(_) => write!(fmt, "<macro expansion>"), MacroExpansion(_) => write!(fmt, "<macro expansion>"),
Anon(_) => write!(fmt, "<anon>"), Anon(_) => write!(fmt, "<anon>"),
ProcMacroSourceCode(_) => write!(fmt, "<proc-macro source code>"), ProcMacroSourceCode(_) => write!(fmt, "<proc-macro source code>"),
CfgSpec(_) => write!(fmt, "<cfgspec>"),
CliCrateAttr(_) => write!(fmt, "<crate attribute>"), CliCrateAttr(_) => write!(fmt, "<crate attribute>"),
Custom(ref s) => write!(fmt, "<{s}>"), Custom(ref s) => write!(fmt, "<{s}>"),
DocTest(ref path, _) => write!(fmt, "{}", path.display()), DocTest(ref path, _) => write!(fmt, "{}", path.display()),
@ -365,7 +361,6 @@ pub fn is_real(&self) -> bool {
Anon(_) Anon(_)
| MacroExpansion(_) | MacroExpansion(_)
| ProcMacroSourceCode(_) | ProcMacroSourceCode(_)
| CfgSpec(_)
| CliCrateAttr(_) | CliCrateAttr(_)
| Custom(_) | Custom(_)
| QuoteExpansion(_) | QuoteExpansion(_)