]> git.lizzy.rs Git - rust.git/commitdiff
Update to fix array_indexing failures: RangeInclusive::NonEmpty is gone
authorGeorg Brandl <georg@python.org>
Fri, 26 May 2017 07:53:52 +0000 (09:53 +0200)
committerGeorg Brandl <georg@python.org>
Fri, 26 May 2017 14:54:07 +0000 (16:54 +0200)
clippy_lints/src/utils/higher.rs
clippy_lints/src/utils/paths.rs

index 10a1c18e1823a5f4f12ea73acf7be1a6cdce0f72..494182ae545b05e6fd7ed083aa26bd62c1db82ca 100644 (file)
@@ -76,8 +76,8 @@ fn get_field<'a>(name: &str, fields: &'a [hir::Field]) -> Option<&'a hir::Expr>
                     end: None,
                     limits: ast::RangeLimits::HalfOpen,
                 })
-            } else if match_path(path, &paths::RANGE_INCLUSIVE_NON_EMPTY_STD) ||
-                      match_path(path, &paths::RANGE_INCLUSIVE_NON_EMPTY) {
+            } else if match_path(path, &paths::RANGE_INCLUSIVE_STD) ||
+                      match_path(path, &paths::RANGE_INCLUSIVE) {
                 Some(Range {
                     start: get_field("start", fields),
                     end: get_field("end", fields),
index f7e0d0c6aae89377bc68dc06bf9f71383ab91265..133a2d65f0e3abce1eec3284fac017d6cde57623 100644 (file)
@@ -49,8 +49,6 @@
 pub const RANGE_FULL: [&'static str; 3] = ["core", "ops", "RangeFull"];
 pub const RANGE_FULL_STD: [&'static str; 3] = ["std", "ops", "RangeFull"];
 pub const RANGE_INCLUSIVE: [&'static str; 3] = ["core", "ops", "RangeInclusive"];
-pub const RANGE_INCLUSIVE_NON_EMPTY: [&'static str; 4] = ["core", "ops", "RangeInclusive", "NonEmpty"];
-pub const RANGE_INCLUSIVE_NON_EMPTY_STD: [&'static str; 4] = ["std", "ops", "RangeInclusive", "NonEmpty"];
 pub const RANGE_INCLUSIVE_STD: [&'static str; 3] = ["std", "ops", "RangeInclusive"];
 pub const RANGE_STD: [&'static str; 3] = ["std", "ops", "Range"];
 pub const RANGE_TO: [&'static str; 3] = ["core", "ops", "RangeTo"];