@@ -39,8 +39,8 @@ use rustc_target::spec::{
3939use crate :: code_stats:: CodeStats ;
4040pub use crate :: code_stats:: { DataTypeKind , FieldInfo , FieldKind , SizeKind , VariantInfo } ;
4141use 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 ,
4444 SwitchWithOptPath ,
4545} ;
4646use crate :: filesearch:: FileSearch ;
@@ -359,9 +359,11 @@ impl Session {
359359 && self . opts . unstable_opts . coverage_options . level >= CoverageLevel :: Mcdc
360360 }
361361
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
365367 }
366368
367369 pub fn is_sanitizer_cfi_enabled ( & self ) -> bool {
0 commit comments