You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #125510 - lcnr:change-proof-trees-to-be-shallow, r=compiler-errors
remove proof tree formatting, make em shallow
Debugging via tracing `RUSTC_LOG=rustc_trait_selection::solve=debug` is now imo slightly more readable then the actual proof tree formatter. Removing everything that's not needed for the `analyse` visitor allows us to remove a bunch of code.
I personally believe that we should continue to use tracing over proof trees for debugging:
- it eagerly prints, allowing us to debug ICEs
- the proof tree builder ends up going out of sync with the actual runtime behavior, which is confusing
- using shallow proof trees is a lot more performant as we frequently do not recurse into all nested goals when using an analyse visitor
- this allows us to clean up the implementation and remove some code
r? ```@compiler-errors```
Copy file name to clipboardexpand all lines: compiler/rustc_session/src/options.rs
+4-22
Original file line number
Diff line number
Diff line change
@@ -399,7 +399,8 @@ mod desc {
399
399
pubconst parse_instrument_xray:&str = "either a boolean (`yes`, `no`, `on`, `off`, etc), or a comma separated list of settings: `always` or `never` (mutually exclusive), `ignore-loops`, `instruction-threshold=N`, `skip-entry`, `skip-exit`";
400
400
pubconst parse_unpretty:&str = "`string` or `string=string`";
401
401
pubconst parse_treat_err_as_bug:&str = "either no value or a non-negative number";
402
-
pubconst parse_next_solver_config:&str = "a comma separated list of solver configurations: `globally` (default), `coherence`, `dump-tree`, `dump-tree-on-error";
402
+
pubconst parse_next_solver_config:&str =
403
+
"a comma separated list of solver configurations: `globally` (default), and `coherence`";
403
404
pubconst parse_lto:&str =
404
405
"either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted";
405
406
pubconst parse_linker_plugin_lto:&str =
@@ -1058,39 +1059,20 @@ mod parse {
1058
1059
ifletSome(config) = v {
1059
1060
letmut coherence = false;
1060
1061
letmut globally = true;
1061
-
letmut dump_tree = None;
1062
1062
for c in config.split(','){
1063
1063
match c {
1064
1064
"globally" => globally = true,
1065
1065
"coherence" => {
1066
1066
globally = false;
1067
1067
coherence = true;
1068
1068
}
1069
-
"dump-tree" => {
1070
-
if dump_tree.replace(DumpSolverProofTree::Always).is_some(){
1071
-
returnfalse;
1072
-
}
1073
-
}
1074
-
"dump-tree-on-error" => {
1075
-
if dump_tree.replace(DumpSolverProofTree::OnError).is_some(){
0 commit comments