Skip to content

Commit a3c31c4

Browse files
committed
Adapting run-pass tests to the new tool_lints
1 parent 5dabc23 commit a3c31c4

17 files changed

+42
-28
lines changed

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

-3
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

+2-2
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

+2-2
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

+2-2
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

+3-1
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

+4-1
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

+4-2
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

+2-2
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

+3-1
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

+3-1
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

tests/run-pass/match_same_arms_const.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#![deny(match_same_arms)]
1+
#![feature(tool_lints)]
2+
3+
#![deny(clippy::match_same_arms)]
24

35
const PRICE_OF_SWEETS: u32 = 5;
46
const PRICE_OF_KINDNESS: u32 = 0;

tests/run-pass/mut_mut_macro.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#![deny(mut_mut, zero_ptr, cmp_nan)]
1+
#![feature(tool_lints)]
2+
3+
#![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)]
24
#![allow(dead_code)]
35

46
// compiletest + extern crates doesn't work together

tests/run-pass/needless_borrow_fp.rs

+3-1
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
#[derive(Debug)]
46
pub enum Error {

tests/run-pass/needless_lifetimes_impl_trait.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#![feature(tool_lints)]
12

2-
#![deny(needless_lifetimes)]
3+
#![deny(clippy::needless_lifetimes)]
34
#![allow(dead_code)]
45

56
trait Foo {}

tests/run-pass/regressions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#![feature(tool_lints)]
12

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

55
pub fn foo(bar: *const u8) {
66
println!("{:#p}", bar);

tests/run-pass/single-match-else.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#![feature(tool_lints)]
12

2-
3-
#![warn(single_match_else)]
3+
#![warn(clippy::single_match_else)]
44

55
fn main() {
66
let n = match (42, 43) {

tests/run-pass/used_underscore_binding_macro.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
2-
1+
#![feature(tool_lints)]
32

43
#[macro_use]
54
extern crate serde_derive;
65

76
/// Test that we do not lint for unused underscores in a `MacroAttribute`
87
/// expansion
9-
#[deny(used_underscore_binding)]
8+
#[deny(clippy::used_underscore_binding)]
109
#[derive(Deserialize)]
1110
struct MacroAttributesTest {
1211
_foo: u32,

0 commit comments

Comments
 (0)