-
-
-
pub trait Trait {
const CONSTANT: u8;
}
+#![feature(tool_lints)]
-
-#![deny(clippy)]
+#![deny(clippy::all)]
#![allow(unused_imports)]
use std::*;
+#![feature(tool_lints)]
-
-#![allow(clippy)]
+#![allow(clippy::all)]
fn main() {
match 1 {
+#![feature(tool_lints)]
-
-#![allow(clippy)]
+#![allow(clippy::all)]
fn main() { }
-#![allow(dead_code, char_lit_as_u8, needless_bool)]
+#![feature(tool_lints)]
+
+#![allow(dead_code, clippy::char_lit_as_u8, clippy::needless_bool)]
/// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
///
-#![allow(unused_variables, blacklisted_name, needless_pass_by_value, dead_code)]
+#![feature(tool_lints)]
+
+#![allow(unused_variables, clippy::blacklisted_name,
+ clippy::needless_pass_by_value, dead_code)]
// This should not compile-fail with:
//
+#![feature(tool_lints)]
+
use std::collections::HashSet;
// See https://github.com/rust-lang-nursery/rust-clippy/issues/2774
#[derive(Eq, PartialEq, Debug, Hash)]
pub struct Foo {}
-#[allow(implicit_hasher)]
+#[allow(clippy::implicit_hasher)]
// This should not cause a 'cannot relate bound region' ICE
pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
let mut foos = HashSet::new();
);
}
-#[allow(implicit_hasher)]
+#[allow(clippy::implicit_hasher)]
// Also this should not cause a 'cannot relate bound region' ICE
pub fn add_barfoos_to_foos2(bars: &HashSet<&Bar>) {
let mut foos = HashSet::new();
+#![feature(tool_lints)]
-
-#![deny(clippy)]
+#![deny(clippy::all)]
fn core() {}
-#![deny(clippy)]
+#![feature(tool_lints)]
+
+#![deny(clippy::all)]
#[allow(dead_code)]
struct Foo;
-#![deny(if_same_then_else)]
+#![feature(tool_lints)]
+
+#![deny(clippy::if_same_then_else)]
fn main() {}
-#![deny(match_same_arms)]
+#![feature(tool_lints)]
+
+#![deny(clippy::match_same_arms)]
const PRICE_OF_SWEETS: u32 = 5;
const PRICE_OF_KINDNESS: u32 = 0;
-#![deny(mut_mut, zero_ptr, cmp_nan)]
+#![feature(tool_lints)]
+
+#![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)]
#![allow(dead_code)]
// compiletest + extern crates doesn't work together
-#[deny(clippy)]
+#![feature(tool_lints)]
+
+#[deny(clippy::all)]
#[derive(Debug)]
pub enum Error {
+#![feature(tool_lints)]
-#![deny(needless_lifetimes)]
+#![deny(clippy::needless_lifetimes)]
#![allow(dead_code)]
trait Foo {}
+#![feature(tool_lints)]
-
-#![allow(blacklisted_name)]
+#![allow(clippy::blacklisted_name)]
pub fn foo(bar: *const u8) {
println!("{:#p}", bar);
+#![feature(tool_lints)]
-
-#![warn(single_match_else)]
+#![warn(clippy::single_match_else)]
fn main() {
let n = match (42, 43) {
+#![feature(tool_lints)]
-
+#![allow(clippy::useless_attribute)] //issue #2910
#[macro_use]
extern crate serde_derive;
/// Test that we do not lint for unused underscores in a `MacroAttribute`
/// expansion
-#[deny(used_underscore_binding)]
+#[deny(clippy::used_underscore_binding)]
#[derive(Deserialize)]
struct MacroAttributesTest {
_foo: u32,