@@ -68,17 +68,17 @@ fn test_arg_value() {
68
68
assert_eq ! ( arg_value( args, "--foo" , |_| true ) , None ) ;
69
69
}
70
70
71
- fn track_clippy_args ( parse_sess : & mut ParseSess , args_env_var : & Option < String > ) {
72
- parse_sess . env_depinfo . get_mut ( ) . insert ( (
71
+ fn track_clippy_args ( psess : & mut ParseSess , args_env_var : & Option < String > ) {
72
+ psess . env_depinfo . get_mut ( ) . insert ( (
73
73
Symbol :: intern ( "CLIPPY_ARGS" ) ,
74
74
args_env_var. as_deref ( ) . map ( Symbol :: intern) ,
75
75
) ) ;
76
76
}
77
77
78
78
/// Track files that may be accessed at runtime in `file_depinfo` so that cargo will re-run clippy
79
79
/// when any of them are modified
80
- fn track_files ( parse_sess : & mut ParseSess ) {
81
- let file_depinfo = parse_sess . file_depinfo . get_mut ( ) ;
80
+ fn track_files ( psess : & mut ParseSess ) {
81
+ let file_depinfo = psess . file_depinfo . get_mut ( ) ;
82
82
83
83
// Used by `clippy::cargo` lints and to determine the MSRV. `cargo clippy` executes `clippy-driver`
84
84
// with the current directory set to `CARGO_MANIFEST_DIR` so a relative path is fine
@@ -115,8 +115,8 @@ struct RustcCallbacks {
115
115
impl rustc_driver:: Callbacks for RustcCallbacks {
116
116
fn config ( & mut self , config : & mut interface:: Config ) {
117
117
let clippy_args_var = self . clippy_args_var . take ( ) ;
118
- config. parse_sess_created = Some ( Box :: new ( move |parse_sess | {
119
- track_clippy_args ( parse_sess , & clippy_args_var) ;
118
+ config. psess_created = Some ( Box :: new ( move |psess | {
119
+ track_clippy_args ( psess , & clippy_args_var) ;
120
120
} ) ) ;
121
121
}
122
122
}
@@ -132,13 +132,13 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
132
132
let conf_path = clippy_config:: lookup_conf_file ( ) ;
133
133
let previous = config. register_lints . take ( ) ;
134
134
let clippy_args_var = self . clippy_args_var . take ( ) ;
135
- config. parse_sess_created = Some ( Box :: new ( move |parse_sess | {
136
- track_clippy_args ( parse_sess , & clippy_args_var) ;
137
- track_files ( parse_sess ) ;
135
+ config. psess_created = Some ( Box :: new ( move |psess | {
136
+ track_clippy_args ( psess , & clippy_args_var) ;
137
+ track_files ( psess ) ;
138
138
139
139
// Trigger a rebuild if CLIPPY_CONF_DIR changes. The value must be a valid string so
140
140
// changes between dirs that are invalid UTF-8 will not trigger rebuilds
141
- parse_sess . env_depinfo . get_mut ( ) . insert ( (
141
+ psess . env_depinfo . get_mut ( ) . insert ( (
142
142
Symbol :: intern ( "CLIPPY_CONF_DIR" ) ,
143
143
env:: var ( "CLIPPY_CONF_DIR" ) . ok ( ) . map ( |dir| Symbol :: intern ( & dir) ) ,
144
144
) ) ;
0 commit comments