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') 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