Skip to content

Commit 2ad00f4

Browse files
committed
reviews
1 parent 040aa58 commit 2ad00f4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ pub enum TraitSolver {
748748
#[derive(Default, Debug, Copy, Clone, Hash, PartialEq, Eq)]
749749
pub enum SolverProofTreeCondition {
750750
#[default]
751-
Never,
751+
OnRequest,
752752
Always,
753753
OnError,
754754
}

compiler/rustc_session/src/options.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ mod desc {
418418
"a `,` separated combination of `bti`, `b-key`, `pac-ret`, or `leaf`";
419419
pub const parse_proc_macro_execution_strategy: &str =
420420
"one of supported execution strategies (`same-thread`, or `cross-thread`)";
421-
pub const parse_solver_proof_tree_condition: &str = "one of: `always`, `never`, `on_error`";
421+
pub const parse_solver_proof_tree_condition: &str =
422+
"one of: `always`, `on-request`, `on-error`";
422423
}
423424

424425
mod parse {
@@ -1246,7 +1247,7 @@ mod parse {
12461247
) -> bool {
12471248
match v {
12481249
None | Some("always") => *slot = SolverProofTreeCondition::Always,
1249-
Some("never") => *slot = SolverProofTreeCondition::Never,
1250+
Some("on-request") => *slot = SolverProofTreeCondition::OnRequest,
12501251
Some("on-error") => *slot = SolverProofTreeCondition::OnError,
12511252
_ => return false,
12521253
};
@@ -1477,8 +1478,9 @@ options! {
14771478
"output statistics about monomorphization collection"),
14781479
dump_mono_stats_format: DumpMonoStatsFormat = (DumpMonoStatsFormat::Markdown, parse_dump_mono_stats, [UNTRACKED],
14791480
"the format to use for -Z dump-mono-stats (`markdown` (default) or `json`)"),
1480-
dump_solver_proof_tree: SolverProofTreeCondition = (SolverProofTreeCondition::Never, parse_solver_proof_tree_condition, [UNTRACKED],
1481-
"dump a proof tree for every goal evaluated by the new trait solver. The default is `always`"),
1481+
dump_solver_proof_tree: SolverProofTreeCondition = (SolverProofTreeCondition::OnRequest, parse_solver_proof_tree_condition, [UNTRACKED],
1482+
"dump a proof tree for every goal evaluated by the new trait solver. If the flag is specified without any options after it
1483+
then it defaults to `always`. If the flag is not specified at all it defaults to `on-request`."),
14821484
dump_solver_proof_tree_uses_cache: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
14831485
"determines whether proof tree generation uses the global cache"),
14841486
dwarf_version: Option<u32> = (None, parse_opt_number, [TRACKED],

compiler/rustc_trait_selection/src/solve/eval_ctxt.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
196196
}
197197

198198
(_, None, GenerateProofTree::Yes(_)) => generate_proof_tree,
199-
// `Never` is kind of weird- it doesn't actually force us to not generate proof trees
200-
// its just the default setting for rustflags forced proof tree generation.
201-
(SolverProofTreeCondition::Never, _, _) => generate_proof_tree,
199+
(SolverProofTreeCondition::OnRequest, _, _) => generate_proof_tree,
202200
(SolverProofTreeCondition::OnError, _, _) => generate_proof_tree,
203201
};
204202

0 commit comments

Comments
 (0)