about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorAndy Caldwell <andycaldwell@microsoft.com>2023-08-09 15:57:16 +0100
committerAndy Caldwell <andycaldwell@microsoft.com>2023-09-08 12:46:06 +0100
commit8e03371fc3209b8b91989b108314e35f471d6b89 (patch)
treee6daf752e96622b474af111105c489a8ebe9de22 /src/doc
parentde4cba3a98a15a891ad708a049c7fb5682083d97 (diff)
Rework no_coverage to coverage(off)
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rustc/src/instrument-coverage.md4
-rw-r--r--src/doc/unstable-book/src/language-features/coverage.md (renamed from src/doc/unstable-book/src/language-features/no-coverage.md)8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/doc/rustc/src/instrument-coverage.md b/src/doc/rustc/src/instrument-coverage.md
index 2535cd4f12c..5b766318331 100644
--- a/src/doc/rustc/src/instrument-coverage.md
+++ b/src/doc/rustc/src/instrument-coverage.md
@@ -173,9 +173,9 @@ Some of the more notable options in this example include:
 [`llvm-cov report`]: https://llvm.org/docs/CommandGuide/llvm-cov.html#llvm-cov-report
 [`llvm-cov show`]: https://llvm.org/docs/CommandGuide/llvm-cov.html#llvm-cov-show
 
-> **Note**: Coverage can also be disabled on an individual function by annotating the function with the [`no_coverage` attribute] (which requires the feature flag `#![feature(no_coverage)]`).
+> **Note**: Coverage can also be disabled on an individual function by annotating the function with the [`coverage(off)` attribute] (which requires the feature flag `#![feature(coverage)]`).
 
-[`no_coverage` attribute]: ../unstable-book/language-features/no-coverage.html
+[`coverage` attribute]: ../unstable-book/language-features/coverage.html
 
 ## Interpreting reports
 
diff --git a/src/doc/unstable-book/src/language-features/no-coverage.md b/src/doc/unstable-book/src/language-features/coverage.md
index 327cdb39791..d200bf6b2bc 100644
--- a/src/doc/unstable-book/src/language-features/no-coverage.md
+++ b/src/doc/unstable-book/src/language-features/coverage.md
@@ -1,4 +1,4 @@
-# `no_coverage`
+# `coverage`
 
 The tracking issue for this feature is: [#84605]
 
@@ -6,7 +6,7 @@ The tracking issue for this feature is: [#84605]
 
 ---
 
-The `no_coverage` attribute can be used to selectively disable coverage
+The `coverage` attribute can be used to selectively disable coverage
 instrumentation in an annotated function. This might be useful to:
 
 -   Avoid instrumentation overhead in a performance critical function
@@ -16,14 +16,14 @@ instrumentation in an annotated function. This might be useful to:
 ## Example
 
 ```rust
-#![feature(no_coverage)]
+#![feature(coverage)]
 
 // `foo()` will get coverage instrumentation (by default)
 fn foo() {
   // ...
 }
 
-#[no_coverage]
+#[coverage(off)]
 fn bar() {
   // ...
 }