Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 42c7b3c

Browse files
authored
Merge pull request #1036 from rust-lang-nursery/rustc-master
Compile with newest rustc master
2 parents 30feab2 + cf6358a commit 42c7b3c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/build/rustc.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use crate::build::{BufWriter, BuildResult};
2929
use crate::config::{ClippyPreference, Config};
3030

3131
use std::collections::HashMap;
32-
use std::default::Default;
3332
use std::ffi::OsString;
3433
use std::io;
3534
use std::path::{Path, PathBuf};
@@ -71,8 +70,9 @@ crate fn rustc(
7170
let mut clippy_args = vec!["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()];
7271

7372
if clippy_pref == ClippyPreference::OptIn {
74-
// `OptIn`: allow clippy require `#![warn(clippy)]` override in each workspace crate
75-
clippy_args.push("-Aclippy".to_owned());
73+
// `OptIn`: Require explicit `#![warn(clippy::all)]` annotation in each workspace crate
74+
clippy_args.push("-A".to_owned());
75+
clippy_args.push("clippy::all".to_owned());
7676
}
7777

7878
args.iter()
@@ -161,9 +161,8 @@ fn clippy_after_parse_callback(state: &mut ::rustc_driver::driver::CompileState<
161161
);
162162
registry.args_hidden = Some(Vec::new());
163163

164-
// TODO handle clippy toml config
165-
let empty_clippy_conf = clippy_lints::Conf::default();
166-
clippy_lints::register_plugins(&mut registry, &empty_clippy_conf);
164+
let conf = clippy_lints::read_conf(&registry);
165+
clippy_lints::register_plugins(&mut registry, &conf);
167166

168167
let Registry {
169168
early_lint_passes,

0 commit comments

Comments
 (0)