about summary refs log tree commit diff
path: root/clippy_lints/src/mem_replace.rs
diff options
context:
space:
mode:
authorAlex Macleod <alex@macleod.io>2023-10-23 13:49:18 +0000
committerAlex Macleod <alex@macleod.io>2023-10-23 15:28:26 +0000
commit7347c1803fa9c151033eb30fd722ff6d6d08ee49 (patch)
tree362668da264adea11bfd86e11184327d7c9782f0 /clippy_lints/src/mem_replace.rs
parent56ece10c88c6fb93cc3592606b364c201fb45127 (diff)
Set existing doc-tests to `no_run`
Diffstat (limited to 'clippy_lints/src/mem_replace.rs')
-rw-r--r--clippy_lints/src/mem_replace.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/mem_replace.rs b/clippy_lints/src/mem_replace.rs
index 8a921d4af16..645c26f39c4 100644
--- a/clippy_lints/src/mem_replace.rs
+++ b/clippy_lints/src/mem_replace.rs
@@ -25,14 +25,14 @@ declare_clippy_lint! {
     /// `None`.
     ///
     /// ### Example
-    /// ```rust
+    /// ```no_run
     /// use std::mem;
     ///
     /// let mut an_option = Some(0);
     /// let replaced = mem::replace(&mut an_option, None);
     /// ```
     /// Is better expressed with:
-    /// ```rust
+    /// ```no_run
     /// let mut an_option = Some(0);
     /// let taken = an_option.take();
     /// ```
@@ -53,7 +53,7 @@ declare_clippy_lint! {
     /// observed in the case of a panic.
     ///
     /// ### Example
-    /// ```
+    /// ```no_run
     /// use std::mem;
     ///# fn may_panic(v: Vec<i32>) -> Vec<i32> { v }
     ///
@@ -84,12 +84,12 @@ declare_clippy_lint! {
     /// take the current value and replace it with the default value of that type.
     ///
     /// ### Example
-    /// ```rust
+    /// ```no_run
     /// let mut text = String::from("foo");
     /// let replaced = std::mem::replace(&mut text, String::default());
     /// ```
     /// Is better expressed with:
-    /// ```rust
+    /// ```no_run
     /// let mut text = String::from("foo");
     /// let taken = std::mem::take(&mut text);
     /// ```