1
Fork 0

Improve docs

This commit is contained in:
mcarton 2016-07-16 00:25:44 +02:00
parent 26fdd3f2b7
commit caa76e119b
No known key found for this signature in database
GPG key ID: 5E427C794CBA45E8
55 changed files with 664 additions and 235 deletions

View file

@ -4,13 +4,18 @@ use rustc::hir::*;
use syntax::ptr::P;
use utils::span_lint;
/// **What it does:** This lint detects giving a mutable reference to a function that only requires an immutable reference.
/// **What it does:** This lint detects giving a mutable reference to a function that only requires
/// an immutable reference.
///
/// **Why is this bad?** The immutable reference rules out all other references to the value. Also the code misleads about the intent of the call site.
/// **Why is this bad?** The immutable reference rules out all other references to the value. Also
/// the code misleads about the intent of the call site.
///
/// **Known problems:** None
///
/// **Example** `my_vec.push(&mut value)`
/// **Example**
/// ```rust
/// my_vec.push(&mut value)
/// ```
declare_lint! {
pub UNNECESSARY_MUT_PASSED,
Warn,