about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-17 13:22:06 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-18 07:39:15 +1100
commit446c8e06d9480ac195077aa82d94759ed8eb637d (patch)
tree818fe66a757a26ef4b4b34c2431afd8059c15251 /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parent8aee35e2ed51a9f782c1bff3f8a165b5a85f0c43 (diff)
downloadrust-446c8e06d9480ac195077aa82d94759ed8eb637d.tar.gz
rust-446c8e06d9480ac195077aa82d94759ed8eb637d.zip
Move `describe_lints` calls.
Currently we have an inconsistency between the "input" and "no input"
cases:
- no input: `rustc --print=sysroot -Whelp` prints the lint help.
- input:    `rustc --print=sysroot -Whelp a.rs` prints the sysroot.

It makes sense to print the lint help in both cases, because that's what
happens with `--help`/`-Zhelp`/`-Chelp`.

In fact, the `describe_lints` in the "input" case happens amazingly
late, after *parsing*. This is because, with plugins, lints used to be
registered much later, when the global context was created. But #117649
moved lint registration much earlier, during session construction.

So this commit moves the `describe_lints` call to a single spot for both
for both the "input" and "no input" cases, as early as possible. This is
still not as early as `--help`/`-Zhelp`/`-Chelp`, because `-Whelp` must
wait until the session is constructed.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions