Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b4781c8
Use default field values in a few more cases
estebank Jan 15, 2026
996d72b
compiletest: Support `--extern` modifiers with `proc-macro` directive
Enselic Jan 17, 2026
0271b6b
regression test for alias-relate changes in lub
jdonszelmann Jan 30, 2026
8c0d93b
Skip overlapping spans in argument error suggestions
chenyukang Jan 31, 2026
8927aa5
Add `inline` syntax for diagnostic messages
JonathanBrouwer Jan 30, 2026
378c6fc
Uitests for `#[diagnostic]`
JonathanBrouwer Jan 30, 2026
523d9d9
Uitests for subdiagnostics
JonathanBrouwer Jan 30, 2026
ca2be71
Add verification for inline fluent messages
JonathanBrouwer Jan 30, 2026
caaee92
more float constants: sqrt(5), 1/sqrt(5)
joshuarayton Sep 23, 2025
cd1c773
Remove `lift_query_info`.
nnethercote Jan 30, 2026
4ff360e
Rename some query-related things.
nnethercote Jan 30, 2026
8e2c9c6
Eliminate some `'a` lifetimes.
nnethercote Jan 30, 2026
c6afd45
Move `depth_limit_error` out of `QueryContext` trait.
nnethercote Feb 1, 2026
59868c1
Fix uninitialized UEFI globals in tests
nicholasbishop Jan 23, 2026
09de0fd
Use `#![feature(adt_const_params)]` for static query flags
Zalathar Jan 30, 2026
c725637
explain why we dont skip some of this work when there are field proje…
RalfJung Feb 2, 2026
c0393cf
resolve: Report more early resolution ambiguities for imports
petrochenkov Oct 24, 2025
629ff9b
Update tests/ui/traits/next-solver/generalize/relate-alias-in-lub.rs
jdonszelmann Feb 2, 2026
82a530c
Port
crazazy Feb 2, 2026
55f75af
Rollup merge of #149596 - petrochenkov:visambig2, r=yaahc
JonathanBrouwer Feb 2, 2026
0a7697c
Rollup merge of #151695 - Enselic:proc-macro-priv-v2, r=Zalathar
JonathanBrouwer Feb 2, 2026
1c42fd4
Rollup merge of #151938 - Zalathar:adt-query-flags, r=nnethercote
JonathanBrouwer Feb 2, 2026
5144366
Rollup merge of #151172 - estebank:default-field-values, r=dianne
JonathanBrouwer Feb 2, 2026
f0355cc
Rollup merge of #151825 - joshuarayton:more-float-constants, r=tgross35
JonathanBrouwer Feb 2, 2026
894d05d
Rollup merge of #151870 - jdonszelmann:regression-test-alias-relate, …
JonathanBrouwer Feb 2, 2026
5e1db44
Rollup merge of #151872 - JonathanBrouwer:diag3, r=Kivooeo
JonathanBrouwer Feb 2, 2026
382c889
Rollup merge of #151902 - RalfJung:place-ty-opt, r=Kobzol
JonathanBrouwer Feb 2, 2026
a34cb94
Rollup merge of #151909 - chenyukang:yukang-fix-151607-disjoint-spans…
JonathanBrouwer Feb 2, 2026
9625c1e
Rollup merge of #151978 - nnethercote:query-cleanups, r=Zalathar
JonathanBrouwer Feb 2, 2026
22b2913
Rollup merge of #151979 - nicholasbishop:push-ssmqyutnpypo, r=jhpratt
JonathanBrouwer Feb 2, 2026
467053f
Rollup merge of #151992 - crazazy:main, r=JonathanBrouwer
JonathanBrouwer Feb 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move depth_limit_error out of QueryContext trait.
It's defined and used in `rustc_query_impl`; `rustc_query_system`
doesn't need it. So it can just be an inherent method on `QueryCtxt`.
  • Loading branch information
nnethercote committed Feb 1, 2026
commit c6afd45ac16e0a665ed6feb2d45cf2a4e2769643
34 changes: 17 additions & 17 deletions compiler/rustc_query_impl/src/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ impl<'tcx> QueryCtxt<'tcx> {
pub fn new(tcx: TyCtxt<'tcx>) -> Self {
QueryCtxt { tcx }
}

fn depth_limit_error(self, job: QueryJobId) {
let query_map = self.collect_active_jobs(true).expect("failed to collect active queries");
let (info, depth) = job.find_dep_kind_root(query_map);

let suggested_limit = match self.tcx.recursion_limit() {
Limit(0) => Limit(2),
limit => limit * 2,
};

self.tcx.sess.dcx().emit_fatal(QueryOverflow {
span: info.job.span,
note: QueryOverflowNote { desc: info.frame.info.extract().description, depth },
suggested_limit,
crate_name: self.tcx.crate_name(LOCAL_CRATE),
});
}
}

impl<'tcx> HasDepContext for QueryCtxt<'tcx> {
Expand Down Expand Up @@ -155,23 +172,6 @@ impl<'tcx> QueryContext<'tcx> for QueryCtxt<'tcx> {
tls::enter_context(&new_icx, compute)
})
}

fn depth_limit_error(self, job: QueryJobId) {
let query_map = self.collect_active_jobs(true).expect("failed to collect active queries");
let (info, depth) = job.find_dep_kind_root(query_map);

let suggested_limit = match self.tcx.recursion_limit() {
Limit(0) => Limit(2),
limit => limit * 2,
};

self.tcx.sess.dcx().emit_fatal(QueryOverflow {
span: info.job.span,
note: QueryOverflowNote { desc: info.frame.info.extract().description, depth },
suggested_limit,
crate_name: self.tcx.crate_name(LOCAL_CRATE),
});
}
}

pub(super) fn try_mark_green<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &dep_graph::DepNode) -> bool {
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_query_system/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,4 @@ pub trait QueryContext<'tcx>: HasDepContext {
/// new query job while it executes.
fn start_query<R>(self, token: QueryJobId, depth_limit: bool, compute: impl FnOnce() -> R)
-> R;

fn depth_limit_error(self, job: QueryJobId);
}
Loading