Merge pull request #223 from quodlibetor/allow-clippy-lint

Allow a clippy lint that depends on rust 1.17
This commit is contained in:
Brandon W Maister 2018-03-04 10:32:37 -05:00 committed by GitHub
commit 312d0898d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -269,6 +269,8 @@ macro_rules! fix { ($x:ident) => (Item::Fixed(Fixed::$x)) }
#[derive(Debug, Clone, PartialEq, Eq, Copy)]
pub struct ParseError(ParseErrorKind);
// clippy false positive https://github.com/rust-lang-nursery/rust-clippy/issues/2475
#[cfg_attr(feature = "cargo-clippy", allow(empty_line_after_outer_attr))]
#[derive(Debug, Clone, PartialEq, Eq, Copy)]
enum ParseErrorKind {
/// Given field is out of permitted range.

View File

@ -391,7 +391,10 @@
// backward compatibility, and this appeases clippy. If minimum rustc
// becomes 1.17, should be able to remove this, those 'static lifetimes,
// and use `static` in a lot of places `const` is used now.
#![cfg_attr(feature = "cargo-clippy", allow(const_static_lifetime))]
//
// Similarly, redundant_field_names lints on not using the
// field-init-shorthand, which was stabilized in rust 1.17.
#![cfg_attr(feature = "cargo-clippy", allow(const_static_lifetime, redundant_field_names))]
extern crate time as oldtime;
extern crate num;