1
Fork 0

Deny warnings in test modules

This commit is contained in:
Cameron Steffen 2021-09-08 08:19:14 -05:00
parent 8c05a15f0a
commit 5d3fc6fc08
7 changed files with 23 additions and 0 deletions

View file

@ -1,5 +1,7 @@
#![feature(test)] // compiletest_rs requires this attribute #![feature(test)] // compiletest_rs requires this attribute
#![feature(once_cell)] #![feature(once_cell)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)]
use compiletest_rs as compiletest; use compiletest_rs as compiletest;
use compiletest_rs::common::Mode as TestMode; 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 // Test dependencies may need an `extern crate` here to ensure that they show up
// in the depinfo file (otherwise cargo thinks they are unused) // in the depinfo file (otherwise cargo thinks they are unused)
#[allow(unused_extern_crates)]
extern crate clippy_utils; extern crate clippy_utils;
#[allow(unused_extern_crates)]
extern crate derive_new; extern crate derive_new;
#[allow(unused_extern_crates)]
extern crate if_chain; extern crate if_chain;
#[allow(unused_extern_crates)]
extern crate itertools; extern crate itertools;
#[allow(unused_extern_crates)]
extern crate quote; extern crate quote;
#[allow(unused_extern_crates)]
extern crate syn; extern crate syn;
fn host_lib() -> PathBuf { fn host_lib() -> PathBuf {

View file

@ -6,6 +6,8 @@
// Dogfood cannot run on Windows // Dogfood cannot run on Windows
#![cfg(not(windows))] #![cfg(not(windows))]
#![feature(once_cell)] #![feature(once_cell)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)]
use std::lazy::SyncLazy; use std::lazy::SyncLazy;
use std::path::PathBuf; use std::path::PathBuf;

View file

@ -1,3 +1,6 @@
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)]
use std::path::PathBuf; use std::path::PathBuf;
use std::process::Command; use std::process::Command;

View file

@ -1,4 +1,6 @@
#![cfg(feature = "integration")] #![cfg(feature = "integration")]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)]
use std::env; use std::env;
use std::ffi::OsStr; use std::ffi::OsStr;

View file

@ -1,3 +1,6 @@
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)]
use std::ffi::OsStr; use std::ffi::OsStr;
use std::path::PathBuf; use std::path::PathBuf;

View file

@ -1,3 +1,5 @@
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)]
#![allow(clippy::assertions_on_constants)] #![allow(clippy::assertions_on_constants)]
use std::fs::{self, DirEntry}; use std::fs::{self, DirEntry};

View file

@ -1,4 +1,7 @@
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)]
#![allow(clippy::single_match_else)] #![allow(clippy::single_match_else)]
use rustc_tools_util::VersionInfo; use rustc_tools_util::VersionInfo;
#[test] #[test]