Rename -Zparse-only
.
I was surprised to find that running with `-Zparse-only` only parses the crate root file. Other files aren't parsed because that happens later during expansion. This commit renames the option and updates the help message to make this clearer.
This commit is contained in:
parent
6b6a867ae9
commit
76adf05cfb
15 changed files with 20 additions and 17 deletions
|
@ -1208,7 +1208,7 @@ impl Options {
|
|||
|
||||
/// Returns `true` if there will be an output file generated.
|
||||
pub fn will_create_output_file(&self) -> bool {
|
||||
!self.unstable_opts.parse_only && // The file is just being parsed
|
||||
!self.unstable_opts.parse_crate_root_only && // The file is just being parsed
|
||||
self.unstable_opts.ls.is_empty() // The file is just being queried
|
||||
}
|
||||
|
||||
|
@ -1864,7 +1864,7 @@ fn parse_output_types(
|
|||
matches: &getopts::Matches,
|
||||
) -> OutputTypes {
|
||||
let mut output_types = BTreeMap::new();
|
||||
if !unstable_opts.parse_only {
|
||||
if !unstable_opts.parse_crate_root_only {
|
||||
for list in matches.opt_strs("emit") {
|
||||
for output_type in list.split(',') {
|
||||
let (shorthand, path) = split_out_file_name(output_type);
|
||||
|
|
|
@ -1937,8 +1937,9 @@ options! {
|
|||
"support compiling tests with panic=abort (default: no)"),
|
||||
panic_in_drop: PanicStrategy = (PanicStrategy::Unwind, parse_panic_strategy, [TRACKED],
|
||||
"panic strategy for panics in drops"),
|
||||
parse_only: bool = (false, parse_bool, [UNTRACKED],
|
||||
"parse only; do not compile, assemble, or link (default: no)"),
|
||||
parse_crate_root_only: bool = (false, parse_bool, [UNTRACKED],
|
||||
"parse the crate root file only; do not parse other files, compile, assemble, or link \
|
||||
(default: no)"),
|
||||
patchable_function_entry: PatchableFunctionEntry = (PatchableFunctionEntry::default(), parse_patchable_function_entry, [TRACKED],
|
||||
"nop padding at function entry"),
|
||||
plt: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue