Rework no_coverage to coverage(off)

This commit is contained in:
Andy Caldwell 2023-08-09 15:57:16 +01:00
parent de4cba3a98
commit 8e03371fc3
No known key found for this signature in database
GPG key ID: D4204541AC1D228D
27 changed files with 183 additions and 158 deletions

View file

@ -317,10 +317,10 @@ fn add_unused_functions(cx: &CodegenCx<'_, '_>) {
{
let codegen_fn_attrs = tcx.codegen_fn_attrs(non_codegenned_def_id);
// If a function is marked `#[no_coverage]`, then skip generating a
// If a function is marked `#[coverage(off)]`, then skip generating a
// dead code stub for it.
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NO_COVERAGE) {
debug!("skipping unused fn marked #[no_coverage]: {:?}", non_codegenned_def_id);
debug!("skipping unused fn marked #[coverage(off)]: {:?}", non_codegenned_def_id);
continue;
}