From 7279cc0abd1b1019d3ccf9e9c3a84a617faebe79 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 10 Sep 2023 12:42:48 +0000 Subject: [PATCH 1/7] List more crate metadata in -Zls --- compiler/rustc_metadata/src/rmeta/decoder.rs | 42 ++++++++++++++++++-- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 7fd3c0f494a11..6fdcf5e98e206 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -731,19 +731,53 @@ impl MetadataBlob { writeln!(out, "name {}{}", root.name(), root.extra_filename)?; writeln!(out, "hash {} stable_crate_id {:?}", root.hash(), root.stable_crate_id)?; writeln!(out, "proc_macro {:?}", root.proc_macro_data.is_some())?; - writeln!(out, "=External Dependencies=")?; - + writeln!(out, "triple {}", root.header.triple.triple())?; + writeln!(out, "edition {}", root.edition)?; + writeln!(out, "symbol_mangling_version {:?}", root.symbol_mangling_version)?; + writeln!( + out, + "required_panic_strategy {:?} panic_in_drop_strategy {:?}", + root.required_panic_strategy, root.panic_in_drop_strategy + )?; + writeln!( + out, + "has_global_allocator {} has_alloc_error_handler {} has_panic_handler {} has_default_lib_allocator {}", + root.has_global_allocator, + root.has_alloc_error_handler, + root.has_panic_handler, + root.has_default_lib_allocator + )?; + writeln!( + out, + "compiler_builtins {} needs_allocator {} needs_panic_runtime {} no_builtins {} panic_runtime {} profiler_runtime {}", + root.compiler_builtins, + root.needs_allocator, + root.needs_panic_runtime, + root.no_builtins, + root.panic_runtime, + root.profiler_runtime + )?; + + writeln!(out, "\n=External Dependencies=")?; + let dylib_dependency_formats = + root.dylib_dependency_formats.decode(self).collect::>(); for (i, dep) in root.crate_deps.decode(self).enumerate() { let CrateDep { name, extra_filename, hash, host_hash, kind, is_private } = dep; let number = i + 1; writeln!( out, - "{number} {name}{extra_filename} hash {hash} host_hash {host_hash:?} kind {kind:?} {privacy}", - privacy = if is_private { "private" } else { "public" } + "{number} {name}{extra_filename} hash {hash} host_hash {host_hash:?} kind {kind:?} {privacy}{linkage}", + privacy = if is_private { "private" } else { "public" }, + linkage = if dylib_dependency_formats.is_empty() { + String::new() + } else { + format!(" linkage {:?}", dylib_dependency_formats[i]) + } )?; } write!(out, "\n")?; + Ok(()) } } From 369a8ac52bd8ad7869b66697d2ccb996009423a9 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 10 Sep 2023 12:55:54 +0000 Subject: [PATCH 2/7] List all defined and required lang items in -Zls --- compiler/rustc_metadata/src/rmeta/decoder.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 6fdcf5e98e206..13236f4ce1f8a 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -778,6 +778,26 @@ impl MetadataBlob { } write!(out, "\n")?; + writeln!(out, "\n=Lang items=")?; + for (id, lang_item) in root.lang_items.decode(self) { + writeln!( + out, + "{} = crate{}", + lang_item.name(), + DefPath::make(LOCAL_CRATE, id, |parent| root + .tables + .def_keys + .get(self, parent) + .unwrap() + .decode(self)) + .to_string_no_crate_verbose() + )?; + } + for lang_item in root.lang_items_missing.decode(self) { + writeln!(out, "{} = ", lang_item.name())?; + } + write!(out, "\n")?; + Ok(()) } } 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: [PATCH 3/7] Show lib features in -Zls and allow configuring which things are shown --- compiler/rustc_driver_impl/src/lib.rs | 6 +- compiler/rustc_metadata/src/locator.rs | 3 +- compiler/rustc_metadata/src/rmeta/decoder.rs | 185 ++++++++++++------- compiler/rustc_session/src/config.rs | 2 +- compiler/rustc_session/src/options.rs | 5 +- 5 files changed, 126 insertions(+), 75 deletions(-) diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index e56347ab38e9b..6175894b2050c 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -700,12 +700,14 @@ pub fn list_metadata( sess: &Session, metadata_loader: &dyn MetadataLoader, ) -> Compilation { - if sess.opts.unstable_opts.ls { + let ls_kinds = &sess.opts.unstable_opts.ls; + if !ls_kinds.is_empty() { match sess.io.input { Input::File(ref ifile) => { let path = &(*ifile); let mut v = Vec::new(); - locator::list_file_metadata(&sess.target, path, metadata_loader, &mut v).unwrap(); + locator::list_file_metadata(&sess.target, path, metadata_loader, &mut v, ls_kinds) + .unwrap(); safe_println!("{}", String::from_utf8(v).unwrap()); } Input::Str { .. } => { diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index bf6004ba86441..3062939d8da69 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -903,10 +903,11 @@ pub fn list_file_metadata( path: &Path, metadata_loader: &dyn MetadataLoader, out: &mut dyn Write, + ls_kinds: &[String], ) -> IoResult<()> { let flavor = get_flavor_from_path(path); match get_metadata_section(target, flavor, path, metadata_loader) { - Ok(metadata) => metadata.list_crate_metadata(out), + Ok(metadata) => metadata.list_crate_metadata(out, ls_kinds), Err(msg) => write!(out, "{msg}\n"), } } diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 13236f4ce1f8a..8f7099971d4bb 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -725,78 +725,125 @@ impl MetadataBlob { LazyValue::::from_position(NonZeroUsize::new(pos).unwrap()).decode(self) } - pub(crate) fn list_crate_metadata(&self, out: &mut dyn io::Write) -> io::Result<()> { + pub(crate) fn list_crate_metadata( + &self, + out: &mut dyn io::Write, + ls_kinds: &[String], + ) -> io::Result<()> { let root = self.get_root(); - writeln!(out, "Crate info:")?; - writeln!(out, "name {}{}", root.name(), root.extra_filename)?; - writeln!(out, "hash {} stable_crate_id {:?}", root.hash(), root.stable_crate_id)?; - writeln!(out, "proc_macro {:?}", root.proc_macro_data.is_some())?; - writeln!(out, "triple {}", root.header.triple.triple())?; - writeln!(out, "edition {}", root.edition)?; - writeln!(out, "symbol_mangling_version {:?}", root.symbol_mangling_version)?; - writeln!( - out, - "required_panic_strategy {:?} panic_in_drop_strategy {:?}", - root.required_panic_strategy, root.panic_in_drop_strategy - )?; - writeln!( - out, - "has_global_allocator {} has_alloc_error_handler {} has_panic_handler {} has_default_lib_allocator {}", - root.has_global_allocator, - root.has_alloc_error_handler, - root.has_panic_handler, - root.has_default_lib_allocator - )?; - writeln!( - out, - "compiler_builtins {} needs_allocator {} needs_panic_runtime {} no_builtins {} panic_runtime {} profiler_runtime {}", - root.compiler_builtins, - root.needs_allocator, - root.needs_panic_runtime, - root.no_builtins, - root.panic_runtime, - root.profiler_runtime - )?; - - writeln!(out, "\n=External Dependencies=")?; - let dylib_dependency_formats = - root.dylib_dependency_formats.decode(self).collect::>(); - for (i, dep) in root.crate_deps.decode(self).enumerate() { - let CrateDep { name, extra_filename, hash, host_hash, kind, is_private } = dep; - let number = i + 1; - - writeln!( - out, - "{number} {name}{extra_filename} hash {hash} host_hash {host_hash:?} kind {kind:?} {privacy}{linkage}", - privacy = if is_private { "private" } else { "public" }, - linkage = if dylib_dependency_formats.is_empty() { - String::new() - } else { - format!(" linkage {:?}", dylib_dependency_formats[i]) + + let all_ls_kinds = vec!["root".to_owned(), "lang_items".to_owned(), "features".to_owned()]; + let ls_kinds = if ls_kinds.contains(&"all".to_owned()) { + &all_ls_kinds + } else { + ls_kinds + }; + + for kind in ls_kinds { + match &**kind { + "root" => { + writeln!(out, "Crate info:")?; + writeln!(out, "name {}{}", root.name(), root.extra_filename)?; + writeln!( + out, + "hash {} stable_crate_id {:?}", + root.hash(), + root.stable_crate_id + )?; + writeln!(out, "proc_macro {:?}", root.proc_macro_data.is_some())?; + writeln!(out, "triple {}", root.header.triple.triple())?; + writeln!(out, "edition {}", root.edition)?; + writeln!(out, "symbol_mangling_version {:?}", root.symbol_mangling_version)?; + writeln!( + out, + "required_panic_strategy {:?} panic_in_drop_strategy {:?}", + root.required_panic_strategy, root.panic_in_drop_strategy + )?; + writeln!( + out, + "has_global_allocator {} has_alloc_error_handler {} has_panic_handler {} has_default_lib_allocator {}", + root.has_global_allocator, + root.has_alloc_error_handler, + root.has_panic_handler, + root.has_default_lib_allocator + )?; + writeln!( + out, + "compiler_builtins {} needs_allocator {} needs_panic_runtime {} no_builtins {} panic_runtime {} profiler_runtime {}", + root.compiler_builtins, + root.needs_allocator, + root.needs_panic_runtime, + root.no_builtins, + root.panic_runtime, + root.profiler_runtime + )?; + + writeln!(out, "\n=External Dependencies=")?; + let dylib_dependency_formats = + root.dylib_dependency_formats.decode(self).collect::>(); + for (i, dep) in root.crate_deps.decode(self).enumerate() { + let CrateDep { name, extra_filename, hash, host_hash, kind, is_private } = + dep; + let number = i + 1; + + writeln!( + out, + "{number} {name}{extra_filename} hash {hash} host_hash {host_hash:?} kind {kind:?} {privacy}{linkage}", + privacy = if is_private { "private" } else { "public" }, + linkage = if dylib_dependency_formats.is_empty() { + String::new() + } else { + format!(" linkage {:?}", dylib_dependency_formats[i]) + } + )?; + } + write!(out, "\n")?; } - )?; - } - write!(out, "\n")?; - - writeln!(out, "\n=Lang items=")?; - for (id, lang_item) in root.lang_items.decode(self) { - writeln!( - out, - "{} = crate{}", - lang_item.name(), - DefPath::make(LOCAL_CRATE, id, |parent| root - .tables - .def_keys - .get(self, parent) - .unwrap() - .decode(self)) - .to_string_no_crate_verbose() - )?; - } - for lang_item in root.lang_items_missing.decode(self) { - writeln!(out, "{} = ", lang_item.name())?; + + "lang_items" => { + writeln!(out, "\n=Lang items=")?; + for (id, lang_item) in root.lang_items.decode(self) { + writeln!( + out, + "{} = crate{}", + lang_item.name(), + DefPath::make(LOCAL_CRATE, id, |parent| root + .tables + .def_keys + .get(self, parent) + .unwrap() + .decode(self)) + .to_string_no_crate_verbose() + )?; + } + for lang_item in root.lang_items_missing.decode(self) { + writeln!(out, "{} = ", lang_item.name())?; + } + write!(out, "\n")?; + } + + "features" => { + writeln!(out, "\n=Lib features=")?; + for (feature, since) in root.lib_features.decode(self) { + writeln!( + out, + "{}{}", + feature, + if let Some(since) = since { + format!(" since {since}") + } else { + String::new() + } + )?; + } + write!(out, "\n")?; + } + + _ => { + writeln!(out, "unknown -Zls kind. allowed values are: no, all, root, lang_items, features")?; + } + } } - write!(out, "\n")?; Ok(()) } diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index d241d1cf18db0..7b1ba1e026f45 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 6c26859228c23..06d11fa68ed69 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], From 7b30550cfe6d400d831f00db06e712585c1155a0 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 10 Sep 2023 14:32:58 +0000 Subject: [PATCH 4/7] Support listing all items in -Zls --- compiler/rustc_metadata/src/rmeta/decoder.rs | 90 +++++++++++++++++--- 1 file changed, 80 insertions(+), 10 deletions(-) diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 8f7099971d4bb..9324f236d2219 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -732,12 +732,13 @@ impl MetadataBlob { ) -> io::Result<()> { let root = self.get_root(); - let all_ls_kinds = vec!["root".to_owned(), "lang_items".to_owned(), "features".to_owned()]; - let ls_kinds = if ls_kinds.contains(&"all".to_owned()) { - &all_ls_kinds - } else { - ls_kinds - }; + let all_ls_kinds = vec![ + "root".to_owned(), + "lang_items".to_owned(), + "features".to_owned(), + "items".to_owned(), + ]; + let ls_kinds = if ls_kinds.contains(&"all".to_owned()) { &all_ls_kinds } else { ls_kinds }; for kind in ls_kinds { match &**kind { @@ -778,7 +779,7 @@ impl MetadataBlob { root.profiler_runtime )?; - writeln!(out, "\n=External Dependencies=")?; + writeln!(out, "=External Dependencies=")?; let dylib_dependency_formats = root.dylib_dependency_formats.decode(self).collect::>(); for (i, dep) in root.crate_deps.decode(self).enumerate() { @@ -801,7 +802,7 @@ impl MetadataBlob { } "lang_items" => { - writeln!(out, "\n=Lang items=")?; + writeln!(out, "=Lang items=")?; for (id, lang_item) in root.lang_items.decode(self) { writeln!( out, @@ -823,7 +824,7 @@ impl MetadataBlob { } "features" => { - writeln!(out, "\n=Lib features=")?; + writeln!(out, "=Lib features=")?; for (feature, since) in root.lib_features.decode(self) { writeln!( out, @@ -839,8 +840,77 @@ impl MetadataBlob { write!(out, "\n")?; } + "items" => { + writeln!(out, "=Items=")?; + + fn print_item( + blob: &MetadataBlob, + out: &mut dyn io::Write, + item: DefIndex, + indent: usize, + ) -> io::Result<()> { + let root = blob.get_root(); + + let def_kind = root.tables.opt_def_kind.get(blob, item).unwrap(); + let def_key = root.tables.def_keys.get(blob, item).unwrap().decode(blob); + let def_name = if item == CRATE_DEF_INDEX { + rustc_span::symbol::kw::Crate + } else { + def_key + .disambiguated_data + .data + .get_opt_name() + .unwrap_or_else(|| Symbol::intern("???")) + }; + let visibility = + root.tables.visibility.get(blob, item).unwrap().decode(blob).map_id( + |index| { + format!( + "crate{}", + DefPath::make(LOCAL_CRATE, index, |parent| root + .tables + .def_keys + .get(blob, parent) + .unwrap() + .decode(blob)) + .to_string_no_crate_verbose() + ) + }, + ); + write!( + out, + "{nil: { - writeln!(out, "unknown -Zls kind. allowed values are: no, all, root, lang_items, features")?; + writeln!( + out, + "unknown -Zls kind. allowed values are: no, all, root, lang_items, features, items" + )?; } } } From af97f86677b924636ae0b4ca2d6d683e132f2b8a Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 10 Sep 2023 14:43:11 +0000 Subject: [PATCH 5/7] Fix test --- compiler/rustc_interface/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index ccf8b5630d476..1746cc8b71916 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -704,7 +704,7 @@ fn test_unstable_options_tracking_hash() { untracked!(keep_hygiene_data, true); untracked!(link_native_libraries, false); untracked!(llvm_time_trace, true); - untracked!(ls, true); + untracked!(ls, vec!["all".to_owned()]); untracked!(macro_backtrace, true); untracked!(meta_stats, true); untracked!(mir_include_spans, true); From 4deb072e796e9a0351c669ea7a6b66b1a0fe023f Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 10 Sep 2023 15:50:48 +0000 Subject: [PATCH 6/7] Fix tests --- tests/run-make/emit-path-unhashed/Makefile | 8 ++++---- tests/run-make/ls-metadata/Makefile | 4 ++-- tests/run-make/output-filename-overwrites-input/Makefile | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/run-make/emit-path-unhashed/Makefile b/tests/run-make/emit-path-unhashed/Makefile index 74047fe5f8631..611f8578140e4 100644 --- a/tests/run-make/emit-path-unhashed/Makefile +++ b/tests/run-make/emit-path-unhashed/Makefile @@ -5,10 +5,10 @@ OUT=$(TMPDIR)/emit # --emit KIND=PATH should not affect crate hash vs --emit KIND all: $(OUT)/a/libfoo.rlib $(OUT)/b/libfoo.rlib $(OUT)/c/libfoo.rlib \ $(TMPDIR)/libfoo.rlib - $(RUSTC) -Zls $(TMPDIR)/libfoo.rlib > $(TMPDIR)/base.txt - $(RUSTC) -Zls $(OUT)/a/libfoo.rlib > $(TMPDIR)/a.txt - $(RUSTC) -Zls $(OUT)/b/libfoo.rlib > $(TMPDIR)/b.txt - $(RUSTC) -Zls $(OUT)/c/libfoo.rlib > $(TMPDIR)/c.txt + $(RUSTC) -Zls=root $(TMPDIR)/libfoo.rlib > $(TMPDIR)/base.txt + $(RUSTC) -Zls=root $(OUT)/a/libfoo.rlib > $(TMPDIR)/a.txt + $(RUSTC) -Zls=root $(OUT)/b/libfoo.rlib > $(TMPDIR)/b.txt + $(RUSTC) -Zls=root $(OUT)/c/libfoo.rlib > $(TMPDIR)/c.txt diff $(TMPDIR)/base.txt $(TMPDIR)/a.txt diff $(TMPDIR)/base.txt $(TMPDIR)/b.txt diff --git a/tests/run-make/ls-metadata/Makefile b/tests/run-make/ls-metadata/Makefile index 123dd64e15cbd..f03569baef7f2 100644 --- a/tests/run-make/ls-metadata/Makefile +++ b/tests/run-make/ls-metadata/Makefile @@ -3,6 +3,6 @@ include ../tools.mk all: $(RUSTC) foo.rs - $(RUSTC) -Z ls $(TMPDIR)/foo + $(RUSTC) -Z ls=root $(TMPDIR)/foo touch $(TMPDIR)/bar - $(RUSTC) -Z ls $(TMPDIR)/bar + $(RUSTC) -Z ls=root $(TMPDIR)/bar diff --git a/tests/run-make/output-filename-overwrites-input/Makefile b/tests/run-make/output-filename-overwrites-input/Makefile index 605b86b253ea3..fe5d231382dcd 100644 --- a/tests/run-make/output-filename-overwrites-input/Makefile +++ b/tests/run-make/output-filename-overwrites-input/Makefile @@ -8,7 +8,7 @@ all: cp bar.rs $(TMPDIR)/bar.rlib $(RUSTC) $(TMPDIR)/bar.rlib -o $(TMPDIR)/bar.rlib 2>&1 \ | $(CGREP) -e "the input file \".*bar.rlib\" would be overwritten by the generated executable" - $(RUSTC) foo.rs 2>&1 && $(RUSTC) -Z ls $(TMPDIR)/foo 2>&1 + $(RUSTC) foo.rs 2>&1 && $(RUSTC) -Z ls=root $(TMPDIR)/foo 2>&1 cp foo.rs $(TMPDIR)/foo.rs $(RUSTC) $(TMPDIR)/foo.rs -o $(TMPDIR)/foo.rs 2>&1 \ | $(CGREP) -e "the input file \".*foo.rs\" would be overwritten by the generated executable" 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: [PATCH 7/7] 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(-) diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 9324f236d2219..a57bff3730d51 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 06d11fa68ed69..a13a79cdf2bf6 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)"),