Skip to content

Commit

Permalink
Adapting run-pass tests to the new tool_lints
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Jul 30, 2018
1 parent 1a85098 commit 699f686
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 36 deletions.
3 changes: 0 additions & 3 deletions tests/run-pass/associated-constant-ice.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@



pub trait Trait {
const CONSTANT: u8;
}
Expand Down
4 changes: 1 addition & 3 deletions tests/run-pass/enum-glob-import-crate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


#![deny(clippy)]
#![deny(clippy::all)]
#![allow(unused_imports)]

use std::*;
Expand Down
4 changes: 1 addition & 3 deletions tests/run-pass/ice-1588.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


#![allow(clippy)]
#![allow(clippy::all)]

fn main() {
match 1 {
Expand Down
4 changes: 1 addition & 3 deletions tests/run-pass/ice-1969.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


#![allow(clippy)]
#![allow(clippy::all)]

fn main() { }

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice-2499.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(dead_code, char_lit_as_u8, needless_bool)]
#![allow(dead_code, clippy::char_lit_as_u8, clippy::needless_bool)]

/// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
///
Expand Down
3 changes: 2 additions & 1 deletion tests/run-pass/ice-2760.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(unused_variables, blacklisted_name, needless_pass_by_value, dead_code)]
#![allow(unused_variables, clippy::blacklisted_name,
clippy::needless_pass_by_value, dead_code)]

// This should not compile-fail with:
//
Expand Down
4 changes: 2 additions & 2 deletions tests/run-pass/ice-2774.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Bar {
#[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();
Expand All @@ -19,7 +19,7 @@ pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
);
}

#[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();
Expand Down
4 changes: 1 addition & 3 deletions tests/run-pass/ice-700.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


#![deny(clippy)]
#![deny(clippy::all)]

fn core() {}

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice_exacte_size.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(clippy)]
#![deny(clippy::all)]

#[allow(dead_code)]
struct Foo;
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/if_same_then_else.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(if_same_then_else)]
#![deny(clippy::if_same_then_else)]

fn main() {}

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/match_same_arms_const.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(match_same_arms)]
#![deny(clippy::match_same_arms)]

const PRICE_OF_SWEETS: u32 = 5;
const PRICE_OF_KINDNESS: u32 = 0;
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/mut_mut_macro.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(mut_mut, zero_ptr, cmp_nan)]
#![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)]
#![allow(dead_code)]

// compiletest + extern crates doesn't work together
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/needless_borrow_fp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[deny(clippy)]
#[deny(clippy::all)]

#[derive(Debug)]
pub enum Error {
Expand Down
3 changes: 1 addition & 2 deletions tests/run-pass/needless_lifetimes_impl_trait.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

#![deny(needless_lifetimes)]
#![deny(clippy::needless_lifetimes)]
#![allow(dead_code)]

trait Foo {}
Expand Down
4 changes: 1 addition & 3 deletions tests/run-pass/regressions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


#![allow(blacklisted_name)]
#![allow(clippy::blacklisted_name)]

pub fn foo(bar: *const u8) {
println!("{:#p}", bar);
Expand Down
4 changes: 1 addition & 3 deletions tests/run-pass/single-match-else.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


#![warn(single_match_else)]
#![warn(clippy::single_match_else)]

fn main() {
let n = match (42, 43) {
Expand Down
5 changes: 1 addition & 4 deletions tests/run-pass/used_underscore_binding_macro.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@



#[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,
Expand Down

0 comments on commit 699f686

Please sign in to comment.