1
Fork 0
This commit is contained in:
Boxy 2023-07-04 14:56:05 +01:00
parent 276d628cac
commit 284b61417f
7 changed files with 95 additions and 102 deletions

View file

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

View file

@ -418,8 +418,7 @@ 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`, `on-request`, `on-error`";
pub const parse_dump_solver_proof_tree: &str = "one of: `always`, `on-request`, `on-error`";
}
mod parse {
@ -1241,14 +1240,14 @@ mod parse {
true
}
pub(crate) fn parse_solver_proof_tree_condition(
slot: &mut SolverProofTreeCondition,
pub(crate) fn parse_dump_solver_proof_tree(
slot: &mut DumpSolverProofTree,
v: Option<&str>,
) -> bool {
match v {
None | Some("always") => *slot = SolverProofTreeCondition::Always,
Some("on-request") => *slot = SolverProofTreeCondition::OnRequest,
Some("on-error") => *slot = SolverProofTreeCondition::OnError,
None | Some("always") => *slot = DumpSolverProofTree::Always,
Some("never") => *slot = DumpSolverProofTree::Never,
Some("on-error") => *slot = DumpSolverProofTree::OnError,
_ => return false,
};
true
@ -1478,11 +1477,11 @@ 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::OnRequest, parse_solver_proof_tree_condition, [UNTRACKED],
dump_solver_proof_tree: DumpSolverProofTree = (DumpSolverProofTree::Never, parse_dump_solver_proof_tree, [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_use_cache: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
"determines whether proof tree generation uses the global cache"),
"determines whether dumped proof trees use the global cache"),
dwarf_version: Option<u32> = (None, parse_opt_number, [TRACKED],
"version of DWARF debug information to emit (default: 2 or 4, depending on platform)"),
dylib_lto: bool = (false, parse_bool, [UNTRACKED],