move lint documentation into macro invocations
This commit is contained in:
parent
a8f61e70a8
commit
fe96ffeac9
132 changed files with 5405 additions and 5390 deletions
|
@ -8,18 +8,18 @@ use rustc::{declare_tool_lint, lint_array};
|
|||
use rustc_errors::Applicability;
|
||||
use syntax::source_map::Span;
|
||||
|
||||
/// **What it does:** Checks for usage of `&vec![..]` when using `&[..]` would
|
||||
/// be possible.
|
||||
///
|
||||
/// **Why is this bad?** This is less efficient.
|
||||
///
|
||||
/// **Known problems:** None.
|
||||
///
|
||||
/// **Example:**
|
||||
/// ```rust,ignore
|
||||
/// foo(&vec![1, 2])
|
||||
/// ```
|
||||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for usage of `&vec![..]` when using `&[..]` would
|
||||
/// be possible.
|
||||
///
|
||||
/// **Why is this bad?** This is less efficient.
|
||||
///
|
||||
/// **Known problems:** None.
|
||||
///
|
||||
/// **Example:**
|
||||
/// ```rust,ignore
|
||||
/// foo(&vec![1, 2])
|
||||
/// ```
|
||||
pub USELESS_VEC,
|
||||
perf,
|
||||
"useless `vec!`"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue