1
Fork 0

Rollup merge of #135747 - ehuss:filename-quote, r=SparrowLii

Rename FileName::QuoteExpansion to CfgSpec

I believe this variant name was used incorrectly. The timeline is roughly:

* `FileName::cfg_spec_source_code` was added in https://github.com/rust-lang/rust/pull/54517. However, it used `FileName::Quote` instead of `FileName::CfgSpec` which I believe was a mistake.
* Quote stuff was removed in https://github.com/rust-lang/rust/pull/51285, but did not remove `FileName::Quote`.
* `FileName::CfgSpec` was removed in https://github.com/rust-lang/rust/pull/116474 because it was unused.

This restores it so that the `--cfg` variant uses a name that makes more sense with how it is used, and restores what I think is the original intent.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-20 12:37:56 +08:00 committed by GitHub
commit 82a239c798
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View file

@ -888,7 +888,7 @@ impl Input {
Input::File(file) => Some(file),
Input::Str { name, .. } => match name {
FileName::Real(real) => real.local_path(),
FileName::QuoteExpansion(_) => None,
FileName::CfgSpec(_) => None,
FileName::Anon(_) => None,
FileName::MacroExpansion(_) => None,
FileName::ProcMacroSourceCode(_) => None,