diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-06-20 10:49:40 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-06-26 10:08:05 +1000 |
| commit | 457fda1701e191d9ff439d9d01ee650e6bbefee6 (patch) | |
| tree | 5d1490278414ede2b3889a633312616ecd987f2f /compiler/rustc_middle/src/query/mod.rs | |
| parent | fda509e817abeeecb5b76bc1de844f355675c81e (diff) | |
| download | rust-457fda1701e191d9ff439d9d01ee650e6bbefee6.tar.gz rust-457fda1701e191d9ff439d9d01ee650e6bbefee6.zip | |
coverage: Detach `#[coverage(..)]` from codegen attribute handling
Diffstat (limited to 'compiler/rustc_middle/src/query/mod.rs')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index c5afecffb07..320e21e85da 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -572,6 +572,14 @@ rustc_queries! { separate_provide_extern } + /// Checks for `#[coverage(off)]` or `#[coverage(on)]`. + /// + /// Returns `false` if `#[coverage(off)]` was found, or `true` if + /// either `#[coverage(on)]` or no coverage attribute was found. + query coverage_attr_on(key: LocalDefId) -> bool { + desc { |tcx| "checking for `#[coverage(..)]` on `{}`", tcx.def_path_str(key) } + } + /// Summarizes coverage IDs inserted by the `InstrumentCoverage` MIR pass /// (for compiler option `-Cinstrument-coverage`), after MIR optimizations /// have had a chance to potentially remove some of them. |
