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
Copy file name to clipboardExpand all lines: compiler/rustc_session/src/options.rs
+73
Original file line number
Diff line number
Diff line change
@@ -380,6 +380,7 @@ mod desc {
380
380
pubconst parse_dump_mono_stats:&str = "`markdown` (default) or `json`";
381
381
pubconst parse_instrument_coverage:&str =
382
382
"`all` (default), `except-unused-generics`, `except-unused-functions`, or `off`";
383
+
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`";
383
384
pubconst parse_unpretty:&str = "`string` or `string=string`";
384
385
pubconst parse_treat_err_as_bug:&str = "either no value or a number bigger than 0";
385
386
pubconst parse_trait_solver:&str =
@@ -869,6 +870,68 @@ mod parse {
869
870
true
870
871
}
871
872
873
+
pub(crate)fnparse_instrument_xray(
874
+
slot:&mutOption<InstrumentXRay>,
875
+
v:Option<&str>,
876
+
) -> bool{
877
+
if v.is_some(){
878
+
letmut bool_arg = None;
879
+
ifparse_opt_bool(&mut bool_arg, v){
880
+
*slot = if bool_arg.unwrap(){Some(InstrumentXRay::default())}else{None};
881
+
returntrue;
882
+
}
883
+
}
884
+
885
+
letmut options = slot.get_or_insert_default();
886
+
letmut seen_always = false;
887
+
letmut seen_never = false;
888
+
letmut seen_ignore_loops = false;
889
+
letmut seen_instruction_threshold = false;
890
+
letmut seen_skip_entry = false;
891
+
letmut seen_skip_exit = false;
892
+
for option in v.into_iter().map(|v| v.split(',')).flatten(){
0 commit comments