From ff00763dd1c542abe9897ff62c3acff5baa6d2eb Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 10 Sep 2023 13:24:20 +0000 Subject: Show lib features in -Zls and allow configuring which things are shown --- compiler/rustc_session/src/config.rs | 2 +- compiler/rustc_session/src/options.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index d241d1cf18d..7b1ba1e026f 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1086,7 +1086,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.ls // The file is just being queried + self.unstable_opts.ls.is_empty() // The file is just being queried } #[inline] diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 6c26859228c..06d11fa68ed 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1597,8 +1597,9 @@ options! { "what location details should be tracked when using caller_location, either \ `none`, or a comma separated list of location details, for which \ valid options are `file`, `line`, and `column` (default: `file,line,column`)"), - ls: bool = (false, parse_bool, [UNTRACKED], - "list the symbols defined by a library crate (default: no)"), + ls: Vec = (Vec::new(), parse_list, [UNTRACKED], + "decode and print various part of the crate metadata for a library crate \ + (space separated)"), macro_backtrace: bool = (false, parse_bool, [UNTRACKED], "show macro backtraces (default: no)"), maximal_hir_to_mir_coverage: bool = (false, parse_bool, [TRACKED], -- cgit 1.4.1-3-g733a5 From 026faca4cad00870e28cbcdc914235f48b2a4a86 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 12 Sep 2023 14:42:53 +0000 Subject: Fix two typos --- compiler/rustc_metadata/src/rmeta/decoder.rs | 2 +- compiler/rustc_session/src/options.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 9324f236d22..a57bff3730d 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -909,7 +909,7 @@ impl MetadataBlob { _ => { writeln!( out, - "unknown -Zls kind. allowed values are: no, all, root, lang_items, features, items" + "unknown -Zls kind. allowed values are: all, root, lang_items, features, items" )?; } } diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 06d11fa68ed..a13a79cdf2b 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1598,7 +1598,7 @@ options! { `none`, or a comma separated list of location details, for which \ valid options are `file`, `line`, and `column` (default: `file,line,column`)"), ls: Vec = (Vec::new(), parse_list, [UNTRACKED], - "decode and print various part of the crate metadata for a library crate \ + "decode and print various parts of the crate metadata for a library crate \ (space separated)"), macro_backtrace: bool = (false, parse_bool, [UNTRACKED], "show macro backtraces (default: no)"), -- cgit 1.4.1-3-g733a5