diff options
| author | Suyash458 <suyash.behera458@gmail.com> | 2020-11-30 11:24:10 +0530 |
|---|---|---|
| committer | Suyash458 <suyash.behera458@gmail.com> | 2020-11-30 11:24:10 +0530 |
| commit | e7258ac714941ed5534ae31cddac7164ce1f50c1 (patch) | |
| tree | 9a71f17f5ea0eef71d468a23a7649a57d8e471c8 | |
| parent | 61b29281e744b6af410e9256cc2e9369a3dc173a (diff) | |
| download | rust-e7258ac714941ed5534ae31cddac7164ce1f50c1.tar.gz rust-e7258ac714941ed5534ae31cddac7164ce1f50c1.zip | |
bump rustc-semver version. use in built method to compare versions
| -rw-r--r-- | clippy_lints/Cargo.toml | 2 | ||||
| -rw-r--r-- | clippy_lints/src/utils/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index 45fd87b169f..9b8ff266f5c 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -28,7 +28,7 @@ smallvec = { version = "1", features = ["union"] } toml = "0.5.3" unicode-normalization = "0.1" semver = "0.11" -rustc-semver="1.0.0" +rustc-semver="1.1.0" # NOTE: cargo requires serde feat in its url dep # see <https://github.com/rust-lang/rust/pull/63587#issuecomment-522343864> url = { version = "2.1.0", features = ["serde"] } diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 9c5e55b1ed5..b2f16007e35 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -76,7 +76,7 @@ pub fn parse_msrv(msrv: &str, sess: Option<&Session>, span: Option<Span>) -> Opt } pub fn meets_msrv(msrv: Option<&RustcVersion>, lint_msrv: &RustcVersion) -> bool { - msrv.map_or(true, |msrv| msrv >= lint_msrv) + msrv.map_or(true, |msrv| msrv.meets(*lint_msrv)) } macro_rules! extract_msrv_attr { |
