Skip to content

Commit 6352283

Browse files
committed
Remove unstable flag
1 parent 47d53cd commit 6352283

File tree

5 files changed

+5
-37
lines changed

5 files changed

+5
-37
lines changed

compiler/rustc_hir_typeck/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ fn diagnostic_only_typeck<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &ty::T
153153
typeck_with_fallback(tcx, def_id, fallback, None)
154154
}
155155

156+
/// Same as `typeck` but `inspect` is invoked on evaluation of each root obligation.
157+
/// Inspecting obligations only works with the new trait solver.
156158
pub fn inspect_typeck<'tcx>(
157159
tcx: TyCtxt<'tcx>,
158160
def_id: LocalDefId,

compiler/rustc_infer/src/infer/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,7 @@ impl<'tcx> InferCtxt<'tcx> {
17301730
}
17311731
}
17321732

1733+
/// Attach a callback to be invoked on each root obligation evaluated in the new trait solver.
17331734
pub fn attach_obligation_inspector(&self, inspector: ObligationInspector<'tcx>) {
17341735
debug_assert!(
17351736
self.obligation_inspector.get().is_none(),

compiler/rustc_session/src/options.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1914,9 +1914,6 @@ written to standard error output)"),
19141914
"for every macro invocation, print its name and arguments (default: no)"),
19151915
track_diagnostics: bool = (false, parse_bool, [UNTRACKED],
19161916
"tracks where in rustc a diagnostic was emitted"),
1917-
track_trait_obligations: bool = (false, parse_bool, [TRACKED],
1918-
"tracks evaluated obligations while trait solving, option is only \
1919-
valid when -Z next-solver=globally (default: no)"),
19201917
// Diagnostics are considered side-effects of a query (see `QuerySideEffects`) and are saved
19211918
// alongside query results and changes to translation options can affect diagnostics - so
19221919
// translation options should be tracked.

compiler/rustc_trait_selection/src/solve/fulfill.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'tcx> FulfillmentCtxt<'tcx> {
4444
FulfillmentCtxt { obligations: Vec::new(), usable_in_snapshot: infcx.num_open_snapshots() }
4545
}
4646

47-
fn track_evaluated_obligation(
47+
fn inspect_evaluated_obligation(
4848
&self,
4949
infcx: &InferCtxt<'tcx>,
5050
obligation: &PredicateObligation<'tcx>,
@@ -119,7 +119,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
119119
for obligation in mem::take(&mut self.obligations) {
120120
let goal = obligation.clone().into();
121121
let result = infcx.evaluate_root_goal(goal, GenerateProofTree::IfEnabled).0;
122-
self.track_evaluated_obligation(infcx, &obligation, &result);
122+
self.inspect_evaluated_obligation(infcx, &obligation, &result);
123123
let (changed, certainty, nested_goals) = match result {
124124
Ok(result) => result,
125125
Err(NoSolution) => {

tests/ui/traits/track_trait_obligations.rs

-32
This file was deleted.

0 commit comments

Comments
 (0)