| Age | Commit message (Collapse) | Author | Lines |
|
And remove the relevant getters on `Compiler` and `Queries`.
|
|
|
|
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.
Then I had to remove a few unnecessary parens and muts that were exposed
now.
|
|
Like `Compiler::codegen_backend`.
|
|
|
|
It matches the type, and a noun makes more sense than a verb.
The `output_filenames` function still uses a profiling label named
`prepare_outputs`, but I think that makes sense as a verb and can be
left unchanged.
|
|
It can easily be passed in. And that removes the single clone of
`Compiler::codegen_backend`, which means it no longer needs to be `Lrc`.
|
|
It can easily be passed in. And that removes the single clone of
`Compiler::session`, which means it no longer needs to be `Lrc`.
|
|
|
|
This was made possible by the removal of plugin support, which
simplified lint store creation.
This simplifies the places in rustc and rustdoc that call
`describe_lints`, which are early on. The lint store is now built before
those places, so they don't have to create their own lint store for
temporary use, they can just use the main one.
|
|
|
|
They've been deprecated for four years.
This commit includes the following changes.
- It eliminates the `rustc_plugin_impl` crate.
- It changes the language used for lints in
`compiler/rustc_driver_impl/src/lib.rs` and
`compiler/rustc_lint/src/context.rs`. External lints are now called
"loaded" lints, rather than "plugins" to avoid confusion with the old
plugins. This only has a tiny effect on the output of `-W help`.
- E0457 and E0498 are no longer used.
- E0463 is narrowed, now only relating to unfound crates, not plugins.
- The `plugin` feature was moved from "active" to "removed".
- It removes the entire plugins chapter from the unstable book.
- It removes quite a few tests, mostly all of those in
`tests/ui-fulldeps/plugin/`.
Closes #29597.
|
|
This keeps track of usage of internal features, and changes the message
to instead tell them that using internal features is not supported.
See MCP 620.
|
|
|
|
Some more small driver refactors
To improve clarity and simplify some code.
|
|
Only deprecating it rather than making it private to just in case
someone has a use case for it.
|
|
|
|
|
|
|
|
|
|
|
|
It is only used by CrateLoader. We can store the metadata loader in
CStore instead which CrateLoader has access to.
|
|
Constructing an FxIndexMap is useless work as the iteration order never
matters.
|
|
All of them are not exported from rustc_interface and used only during
global_ctxt(). Inlining them makes it easier to follow the order of
queries and slightly reduces line count.
|
|
Removes two pieces of mutable state.
Follow up to #114622.
|
|
Removes a piece of mutable state.
Follow up to #114578.
|
|
Removes a piece of mutable state.
Follow up to #114578.
|
|
|
|
Because `Lrc<Box<T>>` is silly. (Clippy warns about `Rc<Box<T>>` and
`Arc<Box<T>>`, and it would warn here if (a) we used Clippy with rustc,
and (b) Clippy knew about `Lrc`.)
|
|
There's no need to store it in `Queries`. We can just use a local
variable, because it's always used shortly after it's produced.
The commit also removes the `tcx.analysis()` call in `ongoing_codegen`,
because it's easy to ensure that's done beforehand.
All this makes the dataflow within `run_compiler` easier to follow, at
the cost of making one test slightly more verbose, which I think is a
good tradeoff.
|
|
misc issues, added collect to UnordItems
|
|
|
|
this avoids having to rebuild the whole compiler on each commit when
`omit-git-hash = false`.
|
|
Because we're writing to a file, so `FileEncoder` is better because we
don't have to write all the data to memory first.
|
|
|
|
|
|
It partially expands crate attributes before the main expansion pass (without modifying the crate), and the produced preliminary crate attribute list is used for querying a few attributes that are required very early.
Crate-level cfg attributes are then expanded normally during the main expansion pass, like attributes on any other nodes.
|
|
Also some more attributes are passed by reference.
|
|
The crate hash is needed:
- if debug assertions are enabled, or
- if incr. comp. is enabled, or
- if metadata is being generated, or
- if `-C instrumentation-coverage` is enabled.
This commit avoids computing the crate hash when these conditions are
all false, such as when doing a release build of a binary crate.
It uses `Option` to store the hashes when needed, rather than
computing them on demand, because some of them are needed in multiple
places and computing them on demand would make compilation slower.
The commit also removes `Owner::hash_without_bodies`. There is no
benefit to pre-computing that one, it can just be done in the normal
fashion.
|
|
|
|
|
|
if it fails instead of bubbling out an error
|
|
|
|
|
|
|
|
using TyCtxt
|
|
|
|
|
|
|
|
And remove `Clone` impls and `Lrc`s that are no longer necessary
|