Add the -Zcrate-attr=foo nightly rustc flag to inject crate attributes
This commit is contained in:
parent
b18b9edf00
commit
71276c6abc
6 changed files with 66 additions and 3 deletions
|
@ -100,6 +100,8 @@ pub enum FileName {
|
|||
ProcMacroSourceCode,
|
||||
/// Strings provided as --cfg [cfgspec] stored in a crate_cfg
|
||||
CfgSpec,
|
||||
/// Strings provided as crate attributes in the CLI
|
||||
CliCrateAttr,
|
||||
/// Custom sources for explicit parser calls from plugins and drivers
|
||||
Custom(String),
|
||||
}
|
||||
|
@ -115,6 +117,7 @@ impl std::fmt::Display for FileName {
|
|||
Anon => write!(fmt, "<anon>"),
|
||||
ProcMacroSourceCode => write!(fmt, "<proc-macro source code>"),
|
||||
CfgSpec => write!(fmt, "cfgspec"),
|
||||
CliCrateAttr => write!(fmt, "<crate attribute>"),
|
||||
Custom(ref s) => write!(fmt, "<{}>", s),
|
||||
}
|
||||
}
|
||||
|
@ -137,6 +140,7 @@ impl FileName {
|
|||
MacroExpansion |
|
||||
ProcMacroSourceCode |
|
||||
CfgSpec |
|
||||
CliCrateAttr |
|
||||
Custom(_) |
|
||||
QuoteExpansion => false,
|
||||
}
|
||||
|
@ -150,6 +154,7 @@ impl FileName {
|
|||
MacroExpansion |
|
||||
ProcMacroSourceCode |
|
||||
CfgSpec |
|
||||
CliCrateAttr |
|
||||
Custom(_) |
|
||||
QuoteExpansion => false,
|
||||
Macros(_) => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue