Skip to content

Commit de58c56

Browse files
committed
Changed RANGE_FULL constant in utils
1 parent e7138e0 commit de58c56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/match_on_vec_items.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::utils::{is_type_diagnostic_item, match_type, snippet, span_lint_and_sugg, walk_ptrs_ty};
1+
use crate::utils::{self, is_type_diagnostic_item, match_type, snippet, span_lint_and_sugg, walk_ptrs_ty};
22
use if_chain::if_chain;
33
use rustc_errors::Applicability;
44
use rustc_hir::{Expr, ExprKind, MatchSource};
@@ -96,5 +96,5 @@ fn is_vector(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
9696
fn is_full_range(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
9797
let ty = cx.tables.expr_ty(expr);
9898
let ty = walk_ptrs_ty(ty);
99-
match_type(cx, ty, &["core", "ops", "range", "RangeFull"])
99+
match_type(cx, ty, &utils::paths::RANGE_FULL)
100100
}

clippy_lints/src/utils/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub const RANGE: [&str; 3] = ["core", "ops", "Range"];
8585
pub const RANGE_ARGUMENT_TRAIT: [&str; 3] = ["core", "ops", "RangeBounds"];
8686
pub const RANGE_FROM: [&str; 3] = ["core", "ops", "RangeFrom"];
8787
pub const RANGE_FROM_STD: [&str; 3] = ["std", "ops", "RangeFrom"];
88-
pub const RANGE_FULL: [&str; 3] = ["core", "ops", "RangeFull"];
88+
pub const RANGE_FULL: [&str; 4] = ["core", "ops", "range", "RangeFull"];
8989
pub const RANGE_FULL_STD: [&str; 3] = ["std", "ops", "RangeFull"];
9090
pub const RANGE_INCLUSIVE_NEW: [&str; 4] = ["core", "ops", "RangeInclusive", "new"];
9191
pub const RANGE_INCLUSIVE_STD_NEW: [&str; 4] = ["std", "ops", "RangeInclusive", "new"];

0 commit comments

Comments
 (0)