about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-11 03:29:55 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2020-01-19 10:06:08 +0900
commitae872fe1c74d68d7d1e88079cc77c858268fcdbf (patch)
tree03fe777685672821eca54a2be8ec2153366031a7
parent9e55424bdc4b837e38a7f52139ad6158d7818102 (diff)
downloadrust-ae872fe1c74d68d7d1e88079cc77c858268fcdbf.tar.gz
rust-ae872fe1c74d68d7d1e88079cc77c858268fcdbf.zip
Rename `ok_if_let` to `if_let_some_result`
-rw-r--r--clippy_lints/src/if_let_some_result.rs (renamed from clippy_lints/src/ok_if_let.rs)0
-rw-r--r--clippy_lints/src/lib.rs10
-rw-r--r--src/lintlist/mod.rs2
-rw-r--r--tests/ui/if_let_some_result.fixed (renamed from tests/ui/ok_if_let.fixed)0
-rw-r--r--tests/ui/if_let_some_result.rs (renamed from tests/ui/ok_if_let.rs)0
-rw-r--r--tests/ui/if_let_some_result.stderr (renamed from tests/ui/ok_if_let.stderr)4
6 files changed, 8 insertions, 8 deletions
diff --git a/clippy_lints/src/ok_if_let.rs b/clippy_lints/src/if_let_some_result.rs
index dc129a28e37..dc129a28e37 100644
--- a/clippy_lints/src/ok_if_let.rs
+++ b/clippy_lints/src/if_let_some_result.rs
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index 5fe0d937f2f..8a90e39f2e9 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -210,6 +210,7 @@ pub mod functions;
 pub mod get_last_with_len;
 pub mod identity_conversion;
 pub mod identity_op;
+pub mod if_let_some_result;
 pub mod if_not_else;
 pub mod implicit_return;
 pub mod indexing_slicing;
@@ -263,7 +264,6 @@ pub mod new_without_default;
 pub mod no_effect;
 pub mod non_copy_const;
 pub mod non_expressive_names;
-pub mod ok_if_let;
 pub mod open_options;
 pub mod overflow_check_conditional;
 pub mod panic_unimplemented;
@@ -703,7 +703,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         &non_expressive_names::JUST_UNDERSCORES_AND_DIGITS,
         &non_expressive_names::MANY_SINGLE_CHAR_NAMES,
         &non_expressive_names::SIMILAR_NAMES,
-        &ok_if_let::IF_LET_SOME_RESULT,
+        &if_let_some_result::IF_LET_SOME_RESULT,
         &open_options::NONSENSICAL_OPEN_OPTIONS,
         &overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL,
         &panic_unimplemented::PANIC,
@@ -904,7 +904,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
     store.register_late_pass(|| box eval_order_dependence::EvalOrderDependence);
     store.register_late_pass(|| box missing_doc::MissingDoc::new());
     store.register_late_pass(|| box missing_inline::MissingInline);
-    store.register_late_pass(|| box ok_if_let::OkIfLet);
+    store.register_late_pass(|| box if_let_some_result::OkIfLet);
     store.register_late_pass(|| box redundant_pattern_matching::RedundantPatternMatching);
     store.register_late_pass(|| box partialeq_ne_impl::PartialEqNeImpl);
     store.register_late_pass(|| box unused_io_amount::UnusedIoAmount);
@@ -1265,7 +1265,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(&non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST),
         LintId::of(&non_expressive_names::JUST_UNDERSCORES_AND_DIGITS),
         LintId::of(&non_expressive_names::MANY_SINGLE_CHAR_NAMES),
-        LintId::of(&ok_if_let::IF_LET_SOME_RESULT),
+        LintId::of(&if_let_some_result::IF_LET_SOME_RESULT),
         LintId::of(&open_options::NONSENSICAL_OPEN_OPTIONS),
         LintId::of(&overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),
         LintId::of(&panic_unimplemented::PANIC_PARAMS),
@@ -1413,7 +1413,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT),
         LintId::of(&non_expressive_names::JUST_UNDERSCORES_AND_DIGITS),
         LintId::of(&non_expressive_names::MANY_SINGLE_CHAR_NAMES),
-        LintId::of(&ok_if_let::IF_LET_SOME_RESULT),
+        LintId::of(&if_let_some_result::IF_LET_SOME_RESULT),
         LintId::of(&panic_unimplemented::PANIC_PARAMS),
         LintId::of(&ptr::CMP_NULL),
         LintId::of(&ptr::PTR_ARG),
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index eee16fcd312..c6339daf2eb 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -705,7 +705,7 @@ pub const ALL_LINTS: [Lint; 347] = [
         group: "style",
         desc: "usage of `ok()` in `if let Some(pat)` statements is unnecessary, match on `Ok(pat)` instead",
         deprecation: None,
-        module: "ok_if_let",
+        module: "if_let_some_result",
     },
     Lint {
         name: "if_not_else",
diff --git a/tests/ui/ok_if_let.fixed b/tests/ui/if_let_some_result.fixed
index 439c749f995..439c749f995 100644
--- a/tests/ui/ok_if_let.fixed
+++ b/tests/ui/if_let_some_result.fixed
diff --git a/tests/ui/ok_if_let.rs b/tests/ui/if_let_some_result.rs
index 83f6ce1d330..83f6ce1d330 100644
--- a/tests/ui/ok_if_let.rs
+++ b/tests/ui/if_let_some_result.rs
diff --git a/tests/ui/ok_if_let.stderr b/tests/ui/if_let_some_result.stderr
index 4aa6057ba47..6925dfa0bf9 100644
--- a/tests/ui/ok_if_let.stderr
+++ b/tests/ui/if_let_some_result.stderr
@@ -1,5 +1,5 @@
 error: Matching on `Some` with `ok()` is redundant
-  --> $DIR/ok_if_let.rs:6:5
+  --> $DIR/if_let_some_result.rs:6:5
    |
 LL | /     if let Some(y) = x.parse().ok() {
 LL | |         y
@@ -19,7 +19,7 @@ LL |     }
    |
 
 error: Matching on `Some` with `ok()` is redundant
-  --> $DIR/ok_if_let.rs:23:9
+  --> $DIR/if_let_some_result.rs:23:9
    |
 LL | /         if let Some(y) = x.parse().ok() {
 LL | |             return y;