File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ pub fn fix(ws: &Workspace<'_>, opts: &mut FixOptions<'_>) -> CargoResult<()> {
107
107
eprintln ! ( "Warning: clippy-driver not found: {:?}" , e) ;
108
108
}
109
109
wrapper. env ( CLIPPY_FIX_ENV , "1" ) ;
110
+ opts. compile_opts . build_config . primary_unit_rustc = Some ( util:: config:: clippy_driver ( ) ) ;
110
111
}
111
112
112
113
if let Some ( clippy_args) = & opts. clippy_args {
@@ -609,11 +610,7 @@ impl Default for PrepareFor {
609
610
impl FixArgs {
610
611
fn get ( ) -> FixArgs {
611
612
let mut ret = FixArgs :: default ( ) ;
612
- if env:: var ( CLIPPY_FIX_ENV ) . is_ok ( ) {
613
- ret. rustc = Some ( util:: config:: clippy_driver ( ) ) ;
614
- } else {
615
- ret. rustc = env:: args_os ( ) . nth ( 1 ) . map ( PathBuf :: from) ;
616
- }
613
+ ret. rustc = env:: args_os ( ) . nth ( 1 ) . map ( PathBuf :: from) ;
617
614
618
615
if let Ok ( clippy_args) = env:: var ( CLIPPY_FIX_ARGS ) {
619
616
ret. clippy_args = serde_json:: from_str ( & clippy_args) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments