Add Clippy msrv configuration file

This allows us to automatically ignore lints that are
incompatible with our MSRV.

Signed-off-by: Joe Richey <joerichey@google.com>
This commit is contained in:
Joe Richey 2021-01-02 19:50:16 -08:00
parent 3303349ef1
commit d5186e0c86
3 changed files with 5 additions and 3 deletions

1
.clippy.toml Normal file
View File

@ -0,0 +1 @@
msrv = "1.34"

View File

@ -174,8 +174,11 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
# https://github.com/rust-lang/rust-clippy/pull/6379 added MSRV
# support, so we need to use nightly until this is on stable.
toolchain: nightly
components: rustfmt, clippy
override: true
- name: clippy
run: cargo clippy --all
- name: fmt

View File

@ -146,8 +146,6 @@
)]
#![no_std]
#![warn(rust_2018_idioms, unused_lifetimes, missing_docs)]
// `matches!` macro was added only in Rust 1.42, which is bigger than our MSRV
#![allow(clippy::match_like_matches_macro)]
#[macro_use]
extern crate cfg_if;