diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-29 06:05:56 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-29 06:10:15 +1100 |
| commit | 76adf05cfbffd78fc3f9e123634e992a70798e8f (patch) | |
| tree | 4b336dfb181acee20f72f418175b9c37cb5f83bd /compiler/rustc_session/src/config.rs | |
| parent | 6b6a867ae9eac4e78d041ac4ee84be1072a48cf7 (diff) | |
| download | rust-76adf05cfbffd78fc3f9e123634e992a70798e8f.tar.gz rust-76adf05cfbffd78fc3f9e123634e992a70798e8f.zip | |
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.
Diffstat (limited to 'compiler/rustc_session/src/config.rs')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 0124397ea46..cb6d539cdf9 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -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); |
