about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src/lib.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-11-29 06:05:56 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-11-29 06:10:15 +1100
commit76adf05cfbffd78fc3f9e123634e992a70798e8f (patch)
tree4b336dfb181acee20f72f418175b9c37cb5f83bd /compiler/rustc_driver_impl/src/lib.rs
parent6b6a867ae9eac4e78d041ac4ee84be1072a48cf7 (diff)
downloadrust-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_driver_impl/src/lib.rs')
-rw-r--r--compiler/rustc_driver_impl/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs
index 256266d2965..ee5a05a0b9d 100644
--- a/compiler/rustc_driver_impl/src/lib.rs
+++ b/compiler/rustc_driver_impl/src/lib.rs
@@ -425,7 +425,9 @@ fn run_compiler(
                 return early_exit();
             }
 
-            if sess.opts.unstable_opts.parse_only || sess.opts.unstable_opts.show_span.is_some() {
+            if sess.opts.unstable_opts.parse_crate_root_only
+                || sess.opts.unstable_opts.show_span.is_some()
+            {
                 return early_exit();
             }