summary refs log tree commit diff
path: root/compiler/rustc_interface/src/passes.rs
AgeCommit message (Collapse)AuthorLines
2024-10-05Handle `rustc_interface` cases of `rustc::potential_query_instability` lintismailarilik-1/+0
2024-10-02restore prior more readable suggestionJacob Kiesel-5/+6
2024-10-01Restore prior behavior with less duplicate info in dep fileJacob Kiesel-21/+14
2024-10-01Write two newlines intentionallyJacob Kiesel-2/+1
2024-10-01no need to comma delimit this, it's already space delimitedJacob Kiesel-2/+2
2024-10-01Fix bug in depinfo outputJacob Kiesel-1/+2
2024-10-01Pile all the checksum info into a comment that goes in the same order as the ↵Jacob Kiesel-13/+20
file list for the makefile
2024-10-01add unstable support for outputting file checksums for use in cargoJacob Kiesel-14/+91
2024-09-27Rollup merge of #130826 - fmease:compiler-mv-obj-safe-dyn-compat, ↵Matthias Krüger-1/+1
r=compiler-errors Compiler: Rename "object safe" to "dyn compatible" Completed T-lang FCP: https://github.com/rust-lang/lang-team/issues/286#issuecomment-2338905118. Tracking issue: https://github.com/rust-lang/rust/issues/130852 Excludes `compiler/rustc_codegen_cranelift` (to be filed separately). Includes Stable MIR. Regarding https://github.com/rust-lang/rust/labels/relnotes, I guess I will manually open a https://github.com/rust-lang/rust/labels/relnotes-tracking-issue since this change affects everything (compiler, library, tools, docs, books, everyday language). r? ghost
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-1/+1
2024-09-24Dogfood `feature(file_buffered)`Josh Stone-1/+1
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-16/+12
2024-09-10Don't call closure_by_move_body_def_id on FnOnce async closures in MIR ↵Michael Goulet-1/+1
validation
2024-09-02chore: Fix typos in 'compiler' (batch 1)Alexander Cyon-1/+1
2024-08-26Remove some unnecessary TODOsMichael Goulet-2/+0
2024-08-26Stop using a special inner body for the coroutine by-move body for async ↵Michael Goulet-0/+16
closures
2024-08-08Add comment that bors did not see pushed before it mergedMichael Goulet-1/+7
2024-08-03Make validate_mir pull optimized/ctfe MIR for all bodiesMichael Goulet-0/+7
2024-07-29Structured suggestion for `extern crate foo` when `foo` isn't resolved in importEsteban Küber-1/+7
When encountering a name in an import that could have come from a crate that wasn't imported, use a structured suggestion to suggest `extern crate foo;` pointing at the right place in the crate. When encountering `_` in an import, do not suggest `extern crate _;`. ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ maybe a missing crate `spam`? | help: consider importing the `spam` crate | LL + extern crate spam; | ```
2024-07-29Reformat `use` declarations.Nicholas Nethercote-13/+10
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-22Inline write_dep_info querybjorn3-1/+1
2024-06-22Clarify visibility of several rustc_interface passesbjorn3-2/+2
2024-06-22Move has_errors_or_delayed_bugs check into start_codegenbjorn3-2/+9
2024-06-22Call check_for_rustc_errors_attr from start_codegenbjorn3-1/+38
2024-06-22Move almost all code from Queries::global_ctxt into passes::create_global_ctxtbjorn3-23/+68
2024-06-16Rename InstanceDef -> InstanceKindMichael Goulet-1/+1
2024-06-06Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk"Rémy Rakic-1/+1
This reverts commit eda4a35f365535af72118118a3597edf5a13c12d, reversing changes made to eb6b35b5bcb3c2a594cb29cd478aeb2893f49d30.
2024-06-05Make top-level `rustc_parse` functions fallible.Nicholas Nethercote-3/+5
Currently we have an awkward mix of fallible and infallible functions: ``` new_parser_from_source_str maybe_new_parser_from_source_str new_parser_from_file (maybe_new_parser_from_file) // missing (new_parser_from_source_file) // missing maybe_new_parser_from_source_file source_str_to_stream maybe_source_file_to_stream ``` We could add the two missing functions, but instead this commit removes of all the infallible ones and renames the fallible ones leaving us with these which are all fallible: ``` new_parser_from_source_str new_parser_from_file new_parser_from_source_file source_str_to_stream source_file_to_stream ``` This requires making `unwrap_or_emit_fatal` public so callers of formerly infallible functions can still work. This does make some of the call sites slightly more verbose, but I think it's worth it for the simpler API. Also, there are two `catch_unwind` calls and one `catch_fatal_errors` call in this diff that become removable thanks this change. (I will do that in a follow-up PR.)
2024-06-05Inline and remove `parse_crate{,_attrs}_from_{file,source_str}`.Nicholas Nethercote-6/+9
All four functions are simple and have a single call site. This requires making `Parser::parse_inner_attributes` public, which is no big deal.
2024-06-03check_is_object_safe -> is_object_safeMichael Goulet-1/+1
2024-05-23Auto merge of #125434 - nnethercote:rm-more-extern-tracing, r=jackh726bors-0/+1
Remove more `#[macro_use] extern crate tracing` Because explicit importing of macros via use items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. Continuing the work from #124511 and #124914. r? `@jackh726`
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_interface`.Nicholas Nethercote-0/+1
2024-05-22rustc: Use `tcx.used_crates(())` moreVadim Petrochenkov-1/+1
And explain when it should be used.
2024-05-03Remove some low-value `use` renamings.Nicholas Nethercote-4/+2
There are a few common abbreviations like `use rustc_ast as ast` and `use rust_hir as hir` for names that are used a lot. But there are also some cases where a crate is renamed just once in the whole codebase, and that ends up making things harder to read rather than easier. This commit removes them.
2024-04-15Do check_coroutine_obligations once per typeck rootMichael Goulet-1/+3
2024-04-12linker: Remove laziness and caching from native search directory walksVadim Petrochenkov-1/+1
It shouldn't be necessary for performance now.
2024-04-12linker: Avoid some allocations in search directory iterationVadim Petrochenkov-1/+3
2024-04-08Ensure we do not accidentally insert new early aborts in the analysis passesOli Scherer-13/+12
2024-04-03Remove MIR unsafe checkMatthew Jasper-3/+0
This also remove safety information from MIR.
2024-03-27Add a `CurrentGcx` type to let the deadlock handler access `TyCtxt`John Kåre Alsaker-0/+1
2024-03-11Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco"Oli Scherer-18/+15
This reverts commit 65cd843ae06ad00123c131a431ed5304e4cd577a, reversing changes made to d255c6a57c393db6221b1ff700daea478436f1cd.
2024-03-11Run a single huge `par_body_owners` instead of many small ones after each other.Oli Scherer-14/+17
This improves parallel rustc parallelism by avoiding the bottleneck after each individual `par_body_owners` (because it needs to wait for queries to finish, so if there is one long running one, a lot of cores will be idle while waiting for the single query).
2024-03-11Never bail out early while running all the type check queriesOli Scherer-1/+1
2024-03-07Rollup merge of #121089 - oli-obk:create_def_feed, r=petrochenkovGuillaume Gomez-8/+10
Remove `feed_local_def_id` best reviewed commit by commit Basically I returned `TyCtxtFeed` from `create_def` and then preserved that in the local caches based on https://github.com/rust-lang/rust/pull/121084 r? ````@petrochenkov````
2024-03-07Rollup merge of #122066 - mu001999:clean, r=oli-obkGuillaume Gomez-0/+5
Add proper cfgs for struct HirIdValidator used only with debug-assert See https://github.com/rust-lang/rust/pull/122065#issuecomment-1980118572. I think it's due to #121752.
2024-03-06Add proper cfgs for struct HirIdValidator used only with debug assertionsr0cky-0/+5
2024-03-05Avoid using feed_unit_query from within queriesOli Scherer-8/+8
2024-03-05Remove a use of feed_local_crate and make it fail if used within queriesOli Scherer-0/+2
2024-03-05Rename all `ParseSess` variables/fields/lifetimes as `psess`.Nicholas Nethercote-8/+8
Existing names for values of this type are `sess`, `parse_sess`, `parse_session`, and `ps`. `sess` is particularly annoying because that's also used for `Session` values, which are often co-located, and it can be difficult to know which type a value named `sess` refers to. (That annoyance is the main motivation for this change.) `psess` is nice and short, which is good for a name used this much. The commit also renames some `parse_sess_created` values as `psess_created`.
2024-02-22Replace unnecessary `abort_if_errors`.Nicholas Nethercote-3/+1
Replace `abort_if_errors` calls that are certain to abort -- because we emit an error immediately beforehand -- with `FatalErro.raise()`.