Skip to content

Commit ea43fed

Browse files
flip1995Manishearth
authored andcommitted
Adapt run-pass tests to the tool_lints
1 parent e9af09c commit ea43fed

17 files changed

+43
-27
lines changed

tests/run-pass/associated-constant-ice.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
3-
41
pub trait Trait {
52
const CONSTANT: u8;
63
}

tests/run-pass/enum-glob-import-crate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#![feature(tool_lints)]
12

2-
3-
#![deny(clippy)]
3+
#![deny(clippy::all)]
44
#![allow(unused_imports)]
55

66
use std::*;

tests/run-pass/ice-1588.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#![feature(tool_lints)]
12

2-
3-
#![allow(clippy)]
3+
#![allow(clippy::all)]
44

55
fn main() {
66
match 1 {

tests/run-pass/ice-1969.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#![feature(tool_lints)]
12

2-
3-
#![allow(clippy)]
3+
#![allow(clippy::all)]
44

55
fn main() { }
66

tests/run-pass/ice-2499.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#![allow(dead_code, char_lit_as_u8, needless_bool)]
1+
#![feature(tool_lints)]
2+
3+
#![allow(dead_code, clippy::char_lit_as_u8, clippy::needless_bool)]
24

35
/// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
46
///

tests/run-pass/ice-2760.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#![allow(unused_variables, blacklisted_name, needless_pass_by_value, dead_code)]
1+
#![feature(tool_lints)]
2+
3+
#![allow(unused_variables, clippy::blacklisted_name,
4+
clippy::needless_pass_by_value, dead_code)]
25

36
// This should not compile-fail with:
47
//

tests/run-pass/ice-2774.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![feature(tool_lints)]
2+
13
use std::collections::HashSet;
24

35
// See https://github.com/rust-lang-nursery/rust-clippy/issues/2774
@@ -10,7 +12,7 @@ pub struct Bar {
1012
#[derive(Eq, PartialEq, Debug, Hash)]
1113
pub struct Foo {}
1214

13-
#[allow(implicit_hasher)]
15+
#[allow(clippy::implicit_hasher)]
1416
// This should not cause a 'cannot relate bound region' ICE
1517
pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
1618
let mut foos = HashSet::new();
@@ -19,7 +21,7 @@ pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
1921
);
2022
}
2123

22-
#[allow(implicit_hasher)]
24+
#[allow(clippy::implicit_hasher)]
2325
// Also this should not cause a 'cannot relate bound region' ICE
2426
pub fn add_barfoos_to_foos2(bars: &HashSet<&Bar>) {
2527
let mut foos = HashSet::new();

tests/run-pass/ice-700.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#![feature(tool_lints)]
12

2-
3-
#![deny(clippy)]
3+
#![deny(clippy::all)]
44

55
fn core() {}
66

tests/run-pass/ice_exacte_size.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#![deny(clippy)]
1+
#![feature(tool_lints)]
2+
3+
#![deny(clippy::all)]
24

35
#[allow(dead_code)]
46
struct Foo;

tests/run-pass/if_same_then_else.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#![deny(if_same_then_else)]
1+
#![feature(tool_lints)]
2+
3+
#![deny(clippy::if_same_then_else)]
24

35
fn main() {}
46

0 commit comments

Comments
 (0)