about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCrazyRoka <RokaRostuk@gmail.com>2020-05-02 17:36:26 +0300
committerCrazyRoka <RokaRostuk@gmail.com>2020-05-02 17:37:03 +0300
commitde58c5644de0d9ffe46e7e2923d2301eaf4dd347 (patch)
treee61dfc1c8ac13d066d39770da70f7815e6abf0a0
parente7138e06291d13163e8ab2a57fe2465451fac193 (diff)
downloadrust-de58c5644de0d9ffe46e7e2923d2301eaf4dd347.tar.gz
rust-de58c5644de0d9ffe46e7e2923d2301eaf4dd347.zip
Changed RANGE_FULL constant in utils
-rw-r--r--clippy_lints/src/match_on_vec_items.rs4
-rw-r--r--clippy_lints/src/utils/paths.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/match_on_vec_items.rs b/clippy_lints/src/match_on_vec_items.rs
index 236362130e5..ee69628e9f0 100644
--- a/clippy_lints/src/match_on_vec_items.rs
+++ b/clippy_lints/src/match_on_vec_items.rs
@@ -1,4 +1,4 @@
-use crate::utils::{is_type_diagnostic_item, match_type, snippet, span_lint_and_sugg, walk_ptrs_ty};
+use crate::utils::{self, is_type_diagnostic_item, match_type, snippet, span_lint_and_sugg, walk_ptrs_ty};
 use if_chain::if_chain;
 use rustc_errors::Applicability;
 use rustc_hir::{Expr, ExprKind, MatchSource};
@@ -96,5 +96,5 @@ fn is_vector(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
 fn is_full_range(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
     let ty = cx.tables.expr_ty(expr);
     let ty = walk_ptrs_ty(ty);
-    match_type(cx, ty, &["core", "ops", "range", "RangeFull"])
+    match_type(cx, ty, &utils::paths::RANGE_FULL)
 }
diff --git a/clippy_lints/src/utils/paths.rs b/clippy_lints/src/utils/paths.rs
index ca2c4ade155..79ca6845c6f 100644
--- a/clippy_lints/src/utils/paths.rs
+++ b/clippy_lints/src/utils/paths.rs
@@ -85,7 +85,7 @@ pub const RANGE: [&str; 3] = ["core", "ops", "Range"];
 pub const RANGE_ARGUMENT_TRAIT: [&str; 3] = ["core", "ops", "RangeBounds"];
 pub const RANGE_FROM: [&str; 3] = ["core", "ops", "RangeFrom"];
 pub const RANGE_FROM_STD: [&str; 3] = ["std", "ops", "RangeFrom"];
-pub const RANGE_FULL: [&str; 3] = ["core", "ops", "RangeFull"];
+pub const RANGE_FULL: [&str; 4] = ["core", "ops", "range", "RangeFull"];
 pub const RANGE_FULL_STD: [&str; 3] = ["std", "ops", "RangeFull"];
 pub const RANGE_INCLUSIVE_NEW: [&str; 4] = ["core", "ops", "RangeInclusive", "new"];
 pub const RANGE_INCLUSIVE_STD_NEW: [&str; 4] = ["std", "ops", "RangeInclusive", "new"];