rust/compiler/rustc_driver_impl
Nicholas Nethercote 446c8e06d9 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.
2023-11-18 07:39:15 +11:00
..
src Move describe_lints calls. 2023-11-18 07:39:15 +11:00
Cargo.toml Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
messages.ftl Stop telling people to submit bugs for internal feature ICEs 2023-10-25 23:23:04 +02:00
README.md Rename rustc_driver to rustc_driver_impl 2023-02-02 07:12:10 +01:00

The driver crate is effectively the "main" function for the rust compiler. It orchestrates the compilation process and "knits together" the code from the other crates within rustc. This crate itself does not contain any of the "main logic" of the compiler (though it does have some code related to pretty printing or other minor compiler options).

For more information about how the driver works, see the rustc dev guide.