@@ -39,8 +39,8 @@ use rustc_target::spec::{
39
39
use crate :: code_stats:: CodeStats ;
40
40
pub use crate :: code_stats:: { DataTypeKind , FieldInfo , FieldKind , SizeKind , VariantInfo } ;
41
41
use crate :: config:: {
42
- self , CoverageLevel , CrateType , DebugInfo , ErrorOutputType , FunctionReturn , Input ,
43
- InstrumentCoverage , OptLevel , OutFileName , OutputType , RemapPathScopeComponents ,
42
+ self , CoverageLevel , CoverageOptions , CrateType , DebugInfo , ErrorOutputType , FunctionReturn ,
43
+ Input , InstrumentCoverage , OptLevel , OutFileName , OutputType , RemapPathScopeComponents ,
44
44
SwitchWithOptPath ,
45
45
} ;
46
46
use crate :: filesearch:: FileSearch ;
@@ -359,9 +359,11 @@ impl Session {
359
359
&& self . opts . unstable_opts . coverage_options . level >= CoverageLevel :: Mcdc
360
360
}
361
361
362
- /// True if `-Zcoverage-options=discard-all-spans-in-codegen` was passed.
363
- pub fn coverage_discard_all_spans_in_codegen ( & self ) -> bool {
364
- self . opts . unstable_opts . coverage_options . discard_all_spans_in_codegen
362
+ /// Provides direct access to the `CoverageOptions` struct, so that
363
+ /// individual flags for debugging/testing coverage instrumetation don't
364
+ /// need separate accessors.
365
+ pub fn coverage_options ( & self ) -> & CoverageOptions {
366
+ & self . opts . unstable_opts . coverage_options
365
367
}
366
368
367
369
pub fn is_sanitizer_cfi_enabled ( & self ) -> bool {
0 commit comments