added wiki comments + wiki-generating python script
This commit is contained in:
parent
2fbe762a99
commit
5bbc1427fd
28 changed files with 668 additions and 0 deletions
|
@ -4,6 +4,13 @@ use utils::span_lint;
|
|||
use rustc::middle::ty::{TypeAndMut, TypeVariants, MethodCall, TyS};
|
||||
use syntax::ptr::P;
|
||||
|
||||
/// **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.
|
||||
///
|
||||
/// **Known problems:** None
|
||||
///
|
||||
/// **Example** `my_vec.push(&mut value)`
|
||||
declare_lint! {
|
||||
pub UNNECESSARY_MUT_PASSED,
|
||||
Warn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue