Merge pull request #2696 from nathan/patch-1

Fix rustfmt-induced missing line comments in examples
This commit is contained in:
Oliver Schneider 2018-04-27 23:43:57 +02:00 committed by GitHub
commit d45612e606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -21,7 +21,7 @@ use url::Url;
/// **Examples:** /// **Examples:**
/// ```rust /// ```rust
/// /// Do something with the foo_bar parameter. See also /// /// 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. /// // ^ `foo_bar` and `that::other::module::foo` should be ticked.
/// fn doit(foo_bar) { .. } /// fn doit(foo_bar) { .. }
/// ``` /// ```

View file

@ -17,7 +17,7 @@ use utils::{is_copy, match_def_path, opt_def_id, paths, span_note_and_lint};
/// ```rust /// ```rust
/// let mut lock_guard = mutex.lock(); /// let mut lock_guard = mutex.lock();
/// std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex /// std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex
/// still locked /// // still locked
/// operation_that_requires_mutex_to_be_unlocked(); /// operation_that_requires_mutex_to_be_unlocked();
/// ``` /// ```
declare_clippy_lint! { declare_clippy_lint! {
@ -60,7 +60,7 @@ declare_clippy_lint! {
/// ```rust /// ```rust
/// let x:i32 = 42; // i32 implements Copy /// let x:i32 = 42; // i32 implements Copy
/// std::mem::drop(x) // A copy of x is passed to the function, leaving the /// std::mem::drop(x) // A copy of x is passed to the function, leaving the
/// original unaffected /// // original unaffected
/// ``` /// ```
declare_clippy_lint! { declare_clippy_lint! {
pub DROP_COPY, pub DROP_COPY,
@ -87,7 +87,7 @@ declare_clippy_lint! {
/// ```rust /// ```rust
/// let x:i32 = 42; // i32 implements Copy /// let x:i32 = 42; // i32 implements Copy
/// std::mem::forget(x) // A copy of x is passed to the function, leaving the /// std::mem::forget(x) // A copy of x is passed to the function, leaving the
/// original unaffected /// // original unaffected
/// ``` /// ```
declare_clippy_lint! { declare_clippy_lint! {
pub FORGET_COPY, pub FORGET_COPY,

View file

@ -16,7 +16,7 @@ use utils::{opt_def_id, sugg};
/// ///
/// **Example:** /// **Example:**
/// ```rust /// ```rust
/// let ptr: *const T = core::intrinsics::transmute('x')` /// let ptr: *const T = core::intrinsics::transmute('x')
/// ``` /// ```
declare_clippy_lint! { declare_clippy_lint! {
pub WRONG_TRANSMUTE, pub WRONG_TRANSMUTE,
@ -51,8 +51,8 @@ declare_clippy_lint! {
/// ///
/// **Example:** /// **Example:**
/// ```rust /// ```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 /// // `*t` or `&t`'s
/// ``` /// ```
declare_clippy_lint! { declare_clippy_lint! {
pub CROSSPOINTER_TRANSMUTE, pub CROSSPOINTER_TRANSMUTE,