about summary refs log tree commit diff
path: root/book/src/development/adding_lints.md
diff options
context:
space:
mode:
Diffstat (limited to 'book/src/development/adding_lints.md')
-rw-r--r--book/src/development/adding_lints.md23
1 files changed, 21 insertions, 2 deletions
diff --git a/book/src/development/adding_lints.md b/book/src/development/adding_lints.md
index b1e843bc7f4..3c3f368a529 100644
--- a/book/src/development/adding_lints.md
+++ b/book/src/development/adding_lints.md
@@ -478,8 +478,27 @@ impl<'tcx> LateLintPass<'tcx> for ManualStrip {
 ```
 
 Once the `msrv` is added to the lint, a relevant test case should be added to
-`tests/ui/min_rust_version_attr.rs` which verifies that the lint isn't emitted
-if the project's MSRV is lower.
+the lint's test file, `tests/ui/manual_strip.rs` in this example. It should
+have a case for the version below the MSRV and one with the same contents but
+for the MSRV version itself.
+
+```rust
+#![feature(custom_inner_attributes)]
+
+...
+
+fn msrv_1_44() {
+    #![clippy::msrv = "1.44"]
+
+    /* something that would trigger the lint */
+}
+
+fn msrv_1_45() {
+    #![clippy::msrv = "1.45"]
+
+    /* something that would trigger the lint */
+}
+```
 
 As a last step, the lint should be added to the lint documentation. This is done
 in `clippy_lints/src/utils/conf.rs`: