mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-11 07:34:18 +00:00
Deny warnings in test modules
This commit is contained in:
parent
8c05a15f0a
commit
5d3fc6fc08
7 changed files with 23 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
#![feature(test)] // compiletest_rs requires this attribute
|
||||
#![feature(once_cell)]
|
||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use compiletest_rs as compiletest;
|
||||
use compiletest_rs::common::Mode as TestMode;
|
||||
|
@ -31,11 +33,17 @@ static TEST_DEPENDENCIES: &[&str] = &[
|
|||
|
||||
// Test dependencies may need an `extern crate` here to ensure that they show up
|
||||
// in the depinfo file (otherwise cargo thinks they are unused)
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate clippy_utils;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate derive_new;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate if_chain;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate itertools;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate quote;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate syn;
|
||||
|
||||
fn host_lib() -> PathBuf {
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
// Dogfood cannot run on Windows
|
||||
#![cfg(not(windows))]
|
||||
#![feature(once_cell)]
|
||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use std::lazy::SyncLazy;
|
||||
use std::path::PathBuf;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#![cfg(feature = "integration")]
|
||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use std::env;
|
||||
use std::ffi::OsStr;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use std::ffi::OsStr;
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
#![allow(clippy::assertions_on_constants)]
|
||||
|
||||
use std::fs::{self, DirEntry};
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
#![allow(clippy::single_match_else)]
|
||||
|
||||
use rustc_tools_util::VersionInfo;
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue