From 2b698db1ae2a7c540590c05eb9d6c75e48dbe858 Mon Sep 17 00:00:00 2001 From: Tuomas Siipola Date: Tue, 12 Sep 2017 19:03:34 +0300 Subject: [PATCH 1/3] Fix links in approx_const --- clippy_lints/src/approx_const.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/approx_const.rs b/clippy_lints/src/approx_const.rs index 9d5d87dc4..ed65366d2 100644 --- a/clippy_lints/src/approx_const.rs +++ b/clippy_lints/src/approx_const.rs @@ -7,11 +7,9 @@ use utils::span_lint; /// **What it does:** Checks for floating point literals that approximate /// constants which are defined in -/// [`std::f32::consts`](https://doc.rust-lang. -/// org/stable/std/f32/consts/#constants) +/// [`std::f32::consts`](https://doc.rust-lang.org/stable/std/f32/consts/#constants) /// or -/// [`std::f64::consts`](https://doc.rust-lang. -/// org/stable/std/f64/consts/#constants), +/// [`std::f64::consts`](https://doc.rust-lang.org/stable/std/f64/consts/#constants), /// respectively, suggesting to use the predefined constant. /// /// **Why is this bad?** Usually, the definition in the standard library is more From 6d3db724b74f4b729623ef8e529599e9c2b54513 Mon Sep 17 00:00:00 2001 From: Tuomas Siipola Date: Tue, 12 Sep 2017 19:04:05 +0300 Subject: [PATCH 2/3] Fix empty documentation in unit_expr --- clippy_lints/src/is_unit_expr.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/clippy_lints/src/is_unit_expr.rs b/clippy_lints/src/is_unit_expr.rs index 58df45ad8..734ef1ecb 100644 --- a/clippy_lints/src/is_unit_expr.rs +++ b/clippy_lints/src/is_unit_expr.rs @@ -18,7 +18,6 @@ use utils::span_note_and_lint; /// **Example:** /// * `let x = {"foo" ;}` when the user almost certainly intended `let x /// ={"foo"}` - declare_lint! { pub UNIT_EXPR, Warn, From d768fe8c1666fe2203ceb5eb856992c6a41cced9 Mon Sep 17 00:00:00 2001 From: Tuomas Siipola Date: Tue, 12 Sep 2017 19:04:57 +0300 Subject: [PATCH 3/3] Fix link in trivial_regex --- clippy_lints/src/regex.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/regex.rs b/clippy_lints/src/regex.rs index a18bf6286..e73b98756 100644 --- a/clippy_lints/src/regex.rs +++ b/clippy_lints/src/regex.rs @@ -29,10 +29,8 @@ declare_lint! { "invalid regular expressions" } -/// **What it does:** Checks for trivial [regex] creation (with `Regex::new`, -/// `RegexBuilder::new` or `RegexSet::new`). -/// -/// [regex]: https://crates.io/crates/regex +/// **What it does:** Checks for trivial [regex](https://crates.io/crates/regex) +/// creation (with `Regex::new`, `RegexBuilder::new` or `RegexSet::new`). /// /// **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`