@@ -29,7 +29,6 @@ use crate::build::{BufWriter, BuildResult};
2929use crate :: config:: { ClippyPreference , Config } ;
3030
3131use std:: collections:: HashMap ;
32- use std:: default:: Default ;
3332use std:: ffi:: OsString ;
3433use std:: io;
3534use 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