about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
AgeCommit message (Collapse)AuthorLines
2025-03-12Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgrbors-1/+0
Rollup of 7 pull requests Successful merges: - #137314 (change definitely unproductive cycles to error) - #137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - #138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr) - #138331 (Use `RUSTC_LINT_FLAGS` more) - #138345 (Some autodiff cleanups) - #138387 (intrinsics: remove unnecessary leading underscore from argument names) - #138390 (fix incorrect tracing log) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-11Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
It's no longer necessary now that `-Wunreachable_pub` is being passed.
2025-03-10Revert "Use workspace lints for crates in `compiler/` #138084"许杰友 Jieyou Xu (Joe)-0/+1
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). This breakage was reported in <https://github.com/rust-lang/rust/issues/138304>. This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
2025-03-08Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
(Except for `rustc_codegen_cranelift`.) It's no longer necessary now that `unreachable_pub` is in the workspace lints.
2025-03-07Increase recursion_limit in numerous crates.Nicholas Nethercote-0/+1
This is temporarily needed for `x doc compiler` to work. They can be removed once the `Nonterminal` is removed (#124141).
2025-02-16Move hashes from rustc_data_structure to rustc_hashes so they can be shared ↵Ben Kimock-1/+2
with rust-analyzer
2025-02-05Removed dependency on the field-offset crate.David Venhoek-5/+16
2025-02-03Remove hook calling via `TyCtxtAt`.Nicholas Nethercote-3/+2
All hooks receive a `TyCtxtAt` argument. Currently hooks can be called through `TyCtxtAt` or `TyCtxt`. In the latter case, a `TyCtxtAt` is constructed with a dummy span and passed to the hook. However, in practice hooks are never called through `TyCtxtAt`, and always receive a dummy span. (I confirmed this via code inspection, and double-checked it by temporarily making the `TyCtxtAt` code path panic and running all the tests.) This commit removes all the `TyCtxtAt` machinery for hooks. All hooks now receive `TyCtxt` instead of `TyCtxtAt`. There are two existing hooks that use `TyCtxtAt::span`: `const_caller_location_provider` and `try_destructure_mir_constant_for_user_output`. For both hooks the span is always a dummy span, probably unintentionally. This dummy span use is now explicit. If a non-dummy span is needed for these two hooks it would be easy to add it as an extra argument because hooks are less constrained than queries.
2025-01-07don't return an Option from try_find_dep_kindMartin Zacho-8/+3
2025-01-06improve diagnostics for const eval query overflowMartin Zacho-7/+5
2024-12-13Rename ty_def_id so people will stop using it by accidentMichael Goulet-2/+2
2024-12-06Remove 'tcx lifetime from OnDiskCachebjorn3-3/+3
2024-11-09Move some code from Compiler::enter to GlobalCtxt::finishbjorn3-0/+8
2024-10-03Handle `rustc_query_impl` cases of `rustc::potential_query_instability` lintismailarilik-1/+1
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-12/+12
2024-09-13Rename and reorder lots of lifetimes.Nicholas Nethercote-7/+7
- Replace non-standard names like 's, 'p, 'rg, 'ck, 'parent, 'this, and 'me with vanilla 'a. These are cases where the original name isn't really any more informative than 'a. - Replace names like 'cx, 'mir, and 'body with vanilla 'a when the lifetime applies to multiple fields and so the original lifetime name isn't really accurate. - Put 'tcx last in lifetime lists, and 'a before 'b.
2024-08-29Add `warn(unreachable_pub)` to `rustc_query_impl`.Nicholas Nethercote-18/+27
2024-08-21Simplify some redundant field namesMichael Goulet-1/+1
2024-08-19Prevent double panic in query system, improve diagnosticsFelix Rath-2/+8
2024-07-29Reformat `use` declarations.Nicholas Nethercote-18/+20
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-19Allow tracing through item_bounds query invocations on opaquesOli Scherer-1/+3
Previously these caused cycles when printing the result
2024-06-12Use `tidy` to sort crate attributes for all compiler crates.Nicholas Nethercote-3/+5
We already do this for a number of crates, e.g. `rustc_middle`, `rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`. For the ones we don't, in many cases the attributes are a mess. - There is no consistency about order of attribute kinds (e.g. `allow`/`deny`/`feature`). - Within attribute kind groups (e.g. the `feature` attributes), sometimes the order is alphabetical, and sometimes there is no particular order. - Sometimes the attributes of a particular kind aren't even grouped all together, e.g. there might be a `feature`, then an `allow`, then another `feature`. This commit extends the existing sorting to all compiler crates, increasing consistency. If any new attribute line is added there is now only one place it can go -- no need for arbitrary decisions. Exceptions: - `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`, because they have no crate attributes. - `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's ignored in `rustfmt.toml`).
2024-05-13Remove `extern crate rustc_middle` from `rustc_query_impl`.Nicholas Nethercote-6/+4
2024-05-08Simplify `use crate::rustc_foo::bar` occurrences.Nicholas Nethercote-4/+2
They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)
2024-04-22Stabilize generic `NonZero`.Markus Reiter-1/+0
2024-04-11move QueryKeyStringCache from rustc_middle to rustc_query_impl, where it ↵klensy-4/+13
actually used also allows to drop measureme dep on rustc_middle
2024-03-12Verify that query keys result in unique dep nodesJohn Kåre Alsaker-1/+51
2024-03-04Avoid using unnecessary queries when printing the query stack in panicsJohn Kåre Alsaker-2/+7
2024-03-03Add a proper `with_no_queries` to printingJohn Kåre Alsaker-11/+4
2024-02-28Rename `Diagnostic` as `DiagInner`.Nicholas Nethercote-2/+2
I started by changing it to `DiagData`, but that didn't feel right. `DiagInner` felt much better.
2024-02-15Replace `NonZero::<_>::new` with `NonZero::new`.Markus Reiter-4/+2
2024-02-15Use generic `NonZero` internally.Markus Reiter-2/+3
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-01-25Remove unused featuresclubby789-2/+0
2024-01-09Rollup merge of #119527 - klensy:ordering, r=compiler-errorsGuillaume Gomez-1/+1
don't reexport atomic::ordering via rustc_data_structures, use std import This looks simpler.
2024-01-08Don't check for recursion in generator witness fieldsMichael Goulet-2/+2
2024-01-08Value recovery can take the whole CycleErrorMichael Goulet-3/+3
2024-01-06don't reexport atomic::ordering via rustc_data_structures, use std importklensy-1/+1
2023-12-31Remove two unused feature gates from rustc_query_implbjorn3-3/+0
2023-12-26Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebankbors-2/+5
rework `-Zverbose` implements the changes described in https://github.com/rust-lang/compiler-team/issues/706 the first commit is only a name change from `-Zverbose` to `-Zverbose-internals` and does not change behavior. the second commit changes diagnostics. possible follow up work: - `ty::pretty` could print more info with `--verbose` than it does currently. `-Z verbose-internals` shows too much info in a way that's not helpful to users. michael had ideas about this i didn't fully understand: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408984200 - `--verbose` should imply `-Z write-long-types-to-disk=no`. the code in `ty_string_with_limit` should take `--verbose` into account (apparently this affects `Ty::sort_string`, i'm not familiar with this code). writing a file to disk should suggest passing `--verbose`. r? `@compiler-errors` cc `@estebank`
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-19rename to verbose-internalsjyn-2/+5
2023-11-27QueryContext: rename try_collect_active_jobs -> collect_active_jobs and ↵klensy-7/+7
change it's return type from Option<QueryMap> to QueryMap As there currently always Some(...) inside
2023-11-25rustc: Make `def_kind` mandatory for all `DefId`sVadim Petrochenkov-2/+2
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-15Bump cfg(bootstrap)sMark Rousskov-2/+2
2023-10-28Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwcoJubilee-2/+0
Remove -Zdep-tasks. This option is not useful any more, we can use `tracing` and `RUSTC_LOG` to debug the dep-graph.
2023-10-26Stash and cancel cycle errors for auto trait leakage in opaquesMichael Goulet-0/+3
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+2
2023-10-08Remove useless debugging.Camille GILLOT-2/+0