From f327f261130d090c7eb0b924237f5e321d680399 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 27 Apr 2018 02:31:36 -0400 Subject: [PATCH 1/5] Fix missing line comment in doc_markdown example rustfmt [wrapped the line](https://github.com/rust-lang-nursery/rust-clippy/commit/b25b6b3355efa33c797f4a37afb2f516531ad581#diff-561823671726302d969756ded53a13a7L22), so we need a second `///` --- clippy_lints/src/doc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 5f6c15e222d2..10043df9cbf9 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -21,7 +21,7 @@ use url::Url; /// **Examples:** /// ```rust /// /// Do something with the foo_bar parameter. See also -/// that::other::module::foo. +/// /// that::other::module::foo. /// // ^ `foo_bar` and `that::other::module::foo` should be ticked. /// fn doit(foo_bar) { .. } /// ``` From 8ad5cb61708823ea15598bf5d7b42cc29693e8cb Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 27 Apr 2018 02:37:40 -0400 Subject: [PATCH 2/5] Fix missing line comment in crosspointer_transmute example --- clippy_lints/src/transmute.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/transmute.rs b/clippy_lints/src/transmute.rs index 68321e7bd5e3..7f367e43732b 100644 --- a/clippy_lints/src/transmute.rs +++ b/clippy_lints/src/transmute.rs @@ -52,7 +52,7 @@ declare_clippy_lint! { /// **Example:** /// ```rust /// core::intrinsics::transmute(t)` // where the result type is the same as -/// `*t` or `&t`'s +/// // `*t` or `&t`'s /// ``` declare_clippy_lint! { pub CROSSPOINTER_TRANSMUTE, From 7f0f8acb42e8dcec9336967201f0b2c64cf8c2ec Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 27 Apr 2018 02:39:14 -0400 Subject: [PATCH 3/5] Fix missing line comment in drop_ref example --- clippy_lints/src/drop_forget_ref.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/drop_forget_ref.rs b/clippy_lints/src/drop_forget_ref.rs index 7acc7805f82a..086dd2e20a81 100644 --- a/clippy_lints/src/drop_forget_ref.rs +++ b/clippy_lints/src/drop_forget_ref.rs @@ -17,7 +17,7 @@ use utils::{is_copy, match_def_path, opt_def_id, paths, span_note_and_lint}; /// ```rust /// let mut lock_guard = mutex.lock(); /// std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex -/// still locked +/// // still locked /// operation_that_requires_mutex_to_be_unlocked(); /// ``` declare_clippy_lint! { From 78b141d937610e6a2bb345057d205bb9f9a2b980 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 27 Apr 2018 02:40:19 -0400 Subject: [PATCH 4/5] Fix missing line comments in {drop,forget}_copy examples --- clippy_lints/src/drop_forget_ref.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/drop_forget_ref.rs b/clippy_lints/src/drop_forget_ref.rs index 086dd2e20a81..007accc7fbf8 100644 --- a/clippy_lints/src/drop_forget_ref.rs +++ b/clippy_lints/src/drop_forget_ref.rs @@ -60,7 +60,7 @@ declare_clippy_lint! { /// ```rust /// let x:i32 = 42; // i32 implements Copy /// std::mem::drop(x) // A copy of x is passed to the function, leaving the -/// original unaffected +/// // original unaffected /// ``` declare_clippy_lint! { pub DROP_COPY, @@ -87,7 +87,7 @@ declare_clippy_lint! { /// ```rust /// let x:i32 = 42; // i32 implements Copy /// std::mem::forget(x) // A copy of x is passed to the function, leaving the -/// original unaffected +/// // original unaffected /// ``` declare_clippy_lint! { pub FORGET_COPY, From c9c649b315555c1aa8371599898625184f6d3d83 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 27 Apr 2018 02:43:16 -0400 Subject: [PATCH 5/5] Remove extraneous `'s in {wrong,crosspointer}_transmute examples --- clippy_lints/src/transmute.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/transmute.rs b/clippy_lints/src/transmute.rs index 7f367e43732b..63ea96bbceac 100644 --- a/clippy_lints/src/transmute.rs +++ b/clippy_lints/src/transmute.rs @@ -16,7 +16,7 @@ use utils::{opt_def_id, sugg}; /// /// **Example:** /// ```rust -/// let ptr: *const T = core::intrinsics::transmute('x')` +/// let ptr: *const T = core::intrinsics::transmute('x') /// ``` declare_clippy_lint! { pub WRONG_TRANSMUTE, @@ -51,7 +51,7 @@ declare_clippy_lint! { /// /// **Example:** /// ```rust -/// core::intrinsics::transmute(t)` // where the result type is the same as +/// core::intrinsics::transmute(t) // where the result type is the same as /// // `*t` or `&t`'s /// ``` declare_clippy_lint! {