This commit is contained in:
Boxy 2023-07-04 09:13:10 +01:00
parent 040aa58d0a
commit 2ad00f471a
3 changed files with 8 additions and 8 deletions

View File

@ -748,7 +748,7 @@ pub enum TraitSolver {
#[derive(Default, Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum SolverProofTreeCondition {
#[default]
Never,
OnRequest,
Always,
OnError,
}

View File

@ -418,7 +418,8 @@ mod desc {
"a `,` separated combination of `bti`, `b-key`, `pac-ret`, or `leaf`";
pub const parse_proc_macro_execution_strategy: &str =
"one of supported execution strategies (`same-thread`, or `cross-thread`)";
pub const parse_solver_proof_tree_condition: &str = "one of: `always`, `never`, `on_error`";
pub const parse_solver_proof_tree_condition: &str =
"one of: `always`, `on-request`, `on-error`";
}
mod parse {
@ -1246,7 +1247,7 @@ mod parse {
) -> bool {
match v {
None | Some("always") => *slot = SolverProofTreeCondition::Always,
Some("never") => *slot = SolverProofTreeCondition::Never,
Some("on-request") => *slot = SolverProofTreeCondition::OnRequest,
Some("on-error") => *slot = SolverProofTreeCondition::OnError,
_ => return false,
};
@ -1477,8 +1478,9 @@ options! {
"output statistics about monomorphization collection"),
dump_mono_stats_format: DumpMonoStatsFormat = (DumpMonoStatsFormat::Markdown, parse_dump_mono_stats, [UNTRACKED],
"the format to use for -Z dump-mono-stats (`markdown` (default) or `json`)"),
dump_solver_proof_tree: SolverProofTreeCondition = (SolverProofTreeCondition::Never, parse_solver_proof_tree_condition, [UNTRACKED],
"dump a proof tree for every goal evaluated by the new trait solver. The default is `always`"),
dump_solver_proof_tree: SolverProofTreeCondition = (SolverProofTreeCondition::OnRequest, parse_solver_proof_tree_condition, [UNTRACKED],
"dump a proof tree for every goal evaluated by the new trait solver. If the flag is specified without any options after it
then it defaults to `always`. If the flag is not specified at all it defaults to `on-request`."),
dump_solver_proof_tree_uses_cache: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
"determines whether proof tree generation uses the global cache"),
dwarf_version: Option<u32> = (None, parse_opt_number, [TRACKED],

View File

@ -196,9 +196,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
}
(_, None, GenerateProofTree::Yes(_)) => generate_proof_tree,
// `Never` is kind of weird- it doesn't actually force us to not generate proof trees
// its just the default setting for rustflags forced proof tree generation.
(SolverProofTreeCondition::Never, _, _) => generate_proof_tree,
(SolverProofTreeCondition::OnRequest, _, _) => generate_proof_tree,
(SolverProofTreeCondition::OnError, _, _) => generate_proof_tree,
};