Skip to content

Commit d45612e

Browse files
authored
Merge pull request rust-lang#2696 from nathan/patch-1
Fix rustfmt-induced missing line comments in examples
2 parents ad899fe + c9c649b commit d45612e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clippy_lints/src/doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use url::Url;
2121
/// **Examples:**
2222
/// ```rust
2323
/// /// Do something with the foo_bar parameter. See also
24-
/// that::other::module::foo.
24+
/// /// that::other::module::foo.
2525
/// // ^ `foo_bar` and `that::other::module::foo` should be ticked.
2626
/// fn doit(foo_bar) { .. }
2727
/// ```

clippy_lints/src/drop_forget_ref.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use utils::{is_copy, match_def_path, opt_def_id, paths, span_note_and_lint};
1717
/// ```rust
1818
/// let mut lock_guard = mutex.lock();
1919
/// std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex
20-
/// still locked
20+
/// // still locked
2121
/// operation_that_requires_mutex_to_be_unlocked();
2222
/// ```
2323
declare_clippy_lint! {
@@ -60,7 +60,7 @@ declare_clippy_lint! {
6060
/// ```rust
6161
/// let x:i32 = 42; // i32 implements Copy
6262
/// std::mem::drop(x) // A copy of x is passed to the function, leaving the
63-
/// original unaffected
63+
/// // original unaffected
6464
/// ```
6565
declare_clippy_lint! {
6666
pub DROP_COPY,
@@ -87,7 +87,7 @@ declare_clippy_lint! {
8787
/// ```rust
8888
/// let x:i32 = 42; // i32 implements Copy
8989
/// std::mem::forget(x) // A copy of x is passed to the function, leaving the
90-
/// original unaffected
90+
/// // original unaffected
9191
/// ```
9292
declare_clippy_lint! {
9393
pub FORGET_COPY,

clippy_lints/src/transmute.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use utils::{opt_def_id, sugg};
1616
///
1717
/// **Example:**
1818
/// ```rust
19-
/// let ptr: *const T = core::intrinsics::transmute('x')`
19+
/// let ptr: *const T = core::intrinsics::transmute('x')
2020
/// ```
2121
declare_clippy_lint! {
2222
pub WRONG_TRANSMUTE,
@@ -51,8 +51,8 @@ declare_clippy_lint! {
5151
///
5252
/// **Example:**
5353
/// ```rust
54-
/// core::intrinsics::transmute(t)` // where the result type is the same as
55-
/// `*t` or `&t`'s
54+
/// core::intrinsics::transmute(t) // where the result type is the same as
55+
/// // `*t` or `&t`'s
5656
/// ```
5757
declare_clippy_lint! {
5858
pub CROSSPOINTER_TRANSMUTE,

0 commit comments

Comments
 (0)