mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 05:56:56 +00:00
Auto merge of #9328 - stanislav-tkach:borrow_deref_ref-remove-extra-deref-from-example, r=giraffate
Remove extra dereference from the borrow_deref_ref lint example I don't think such minor change should be mentioned in the changelog. changelog: none
This commit is contained in:
commit
a427b12803
@ -29,20 +29,15 @@ declare_clippy_lint! {
|
||||
///
|
||||
/// ### Example
|
||||
/// ```rust
|
||||
/// fn foo(_x: &str) {}
|
||||
///
|
||||
/// let s = &String::new();
|
||||
///
|
||||
/// let a: &String = &* s;
|
||||
/// foo(&*s);
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```rust
|
||||
/// # fn foo(_x: &str) {}
|
||||
/// # let s = &String::new();
|
||||
/// let a: &String = s;
|
||||
/// foo(&**s);
|
||||
/// ```
|
||||
#[clippy::version = "1.63.0"]
|
||||
pub BORROW_DEREF_REF,
|
||||
|
Loading…
Reference in New Issue
Block a user