mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Simplify the borrow_deref_ref lint example
This commit is contained in:
parent
4d5d191f6a
commit
7727c303e5
1 changed files with 0 additions and 5 deletions
|
@ -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 a new issue