Merge remote-tracking branch 'origin/master' into rustup

This commit is contained in:
Oliver Schneider 2017-09-13 15:41:09 +02:00
commit b2c88b0a35
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
3 changed files with 4 additions and 9 deletions

View file

@ -7,11 +7,9 @@ use utils::span_lint;
/// **What it does:** Checks for floating point literals that approximate /// **What it does:** Checks for floating point literals that approximate
/// constants which are defined in /// constants which are defined in
/// [`std::f32::consts`](https://doc.rust-lang. /// [`std::f32::consts`](https://doc.rust-lang.org/stable/std/f32/consts/#constants)
/// org/stable/std/f32/consts/#constants)
/// or /// or
/// [`std::f64::consts`](https://doc.rust-lang. /// [`std::f64::consts`](https://doc.rust-lang.org/stable/std/f64/consts/#constants),
/// org/stable/std/f64/consts/#constants),
/// respectively, suggesting to use the predefined constant. /// respectively, suggesting to use the predefined constant.
/// ///
/// **Why is this bad?** Usually, the definition in the standard library is more /// **Why is this bad?** Usually, the definition in the standard library is more

View file

@ -18,7 +18,6 @@ use utils::span_note_and_lint;
/// **Example:** /// **Example:**
/// * `let x = {"foo" ;}` when the user almost certainly intended `let x /// * `let x = {"foo" ;}` when the user almost certainly intended `let x
/// ={"foo"}` /// ={"foo"}`
declare_lint! { declare_lint! {
pub UNIT_EXPR, pub UNIT_EXPR,
Warn, Warn,

View file

@ -30,10 +30,8 @@ declare_lint! {
"invalid regular expressions" "invalid regular expressions"
} }
/// **What it does:** Checks for trivial [regex] creation (with `Regex::new`, /// **What it does:** Checks for trivial [regex](https://crates.io/crates/regex)
/// `RegexBuilder::new` or `RegexSet::new`). /// creation (with `Regex::new`, `RegexBuilder::new` or `RegexSet::new`).
///
/// [regex]: https://crates.io/crates/regex
/// ///
/// **Why is this bad?** Matching the regex can likely be replaced by `==` or /// **Why is this bad?** Matching the regex can likely be replaced by `==` or
/// `str::starts_with`, `str::ends_with` or `std::contains` or other `str` /// `str::starts_with`, `str::ends_with` or `std::contains` or other `str`