rust/compiler/rustc_query_impl/src
Nicholas Nethercote a6dd4d870a Remove now-unnecessary indirection.
The previous commit moved some code from `rustc_query_system`, which
doesn't have access to `TyCtxt` and `QueryCtxt`, to `rustc_query_impl`,
which does. We can now remove quite a bit of indirection.

- Three methods in `trait QueryContext` are no longer needed
  (`next_job_id`, `current_query_job`, `start_query`). As a result,
  `QueryCtxt`'s trait impls of these methods are changed to inherent
  methods.

- `qcx: Q::Qcx` parameters are simplified to `qcx: QueryCtxt<'tcx>`.

- `*qcx.dep_context()` occurrences are simplified to `qcx.tcx`, and
  things like `qcx.dep_context().profiler()` become `qcx.tcx.prof`.

- `DepGraphData<<Q::Qcx as HasDepContext>::Deps>` becomes
  `DepGraphData<DepsType>`.

In short, various layers of indirection and abstraction are cut away.
The resulting code is simpler, more concrete, and easier to understand.
It's a good demonstration of the benefits of eliminating
`rustc_query_system`, and there will be more to come.
2026-02-08 17:01:26 +11:00
..
error.rs Move the QueryOverflow and QueryOverflowNote errors. 2026-02-05 09:29:46 +11:00
execution.rs Remove now-unnecessary indirection. 2026-02-08 17:01:26 +11:00
lib.rs Move a lot of rustc_query_system::plumbing to rustc_query_impl::execution (part 1). 2026-02-08 17:01:10 +11:00
plumbing.rs Remove now-unnecessary indirection. 2026-02-08 17:01:26 +11:00
profiling_support.rs Add new self-profile event for aggregating query hit counts 2025-06-25 11:09:58 +02:00
README.md Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00

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