This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,13 @@ fn track_clippy_args(sess: &Session, args_env_var: &Option<String>) {
73
73
struct DefaultCallbacks ;
74
74
impl rustc_driver:: Callbacks for DefaultCallbacks { }
75
75
76
- struct ClippyArgsCallbacks {
76
+ /// This is different from `DefaultCallbacks` that it will inform Cargo to track the value of
77
+ /// `CLIPPY_ARGS` environment variable.
78
+ struct RustcCallbacks {
77
79
clippy_args_var : Option < String > ,
78
80
}
79
81
80
- impl rustc_driver:: Callbacks for ClippyArgsCallbacks {
82
+ impl rustc_driver:: Callbacks for RustcCallbacks {
81
83
fn config ( & mut self , config : & mut interface:: Config ) {
82
84
let previous = config. register_lints . take ( ) ;
83
85
let clippy_args_var = self . clippy_args_var . take ( ) ;
@@ -351,7 +353,7 @@ pub fn main() {
351
353
if clippy_enabled {
352
354
rustc_driver:: RunCompiler :: new ( & args, & mut ClippyCallbacks { clippy_args_var } ) . run ( )
353
355
} else {
354
- rustc_driver:: RunCompiler :: new ( & args, & mut ClippyArgsCallbacks { clippy_args_var } ) . run ( )
356
+ rustc_driver:: RunCompiler :: new ( & args, & mut RustcCallbacks { clippy_args_var } ) . run ( )
355
357
}
356
358
} ) )
357
359
}
You can’t perform that action at this time.
0 commit comments