Skip to content

Commit 028950f

Browse files
committed
Auto merge of #121998 - matthiaskrgr:rollup-l7lzwpb, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #120976 (constify a couple thread_local statics) - #121683 (Fix LVI tests after frame pointers are enabled by default) - #121703 (Add a way to add constructors for `rustc_type_ir` types) - #121732 (Improve assert_matches! documentation) - #121928 (Extract an arguments struct for `Builder::then_else_break`) - #121939 (Small enhancement to description of From trait) - #121968 (Don't run test_get_os_named_thread on win7) - #121969 (`ParseSess` cleanups) - #121977 (Doc: Fix incorrect reference to integer in Atomic{Ptr,Bool}::as_ptr.) - #121994 (Update platform-support.md with supported musl version) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d1b4519 + 1f93d6e commit 028950f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

clippy_lints/src/disallowed_script_idents.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl EarlyLintPass for DisallowedScriptIdents {
7272
return;
7373
}
7474

75-
let symbols = cx.sess().parse_sess.symbol_gallery.symbols.lock();
75+
let symbols = cx.sess().psess.symbol_gallery.symbols.lock();
7676
// Sort by `Span` so that error messages make sense with respect to the
7777
// order of identifier locations in the code.
7878
let mut symbols: Vec<_> = symbols.iter().collect();

clippy_lints/src/doc/needless_doctest_main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ pub fn check(
4848
let dcx = DiagCtxt::new(Box::new(emitter)).disable_warnings();
4949
#[expect(clippy::arc_with_non_send_sync)] // `Lrc` is expected by with_dcx
5050
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
51-
let sess = ParseSess::with_dcx(dcx, sm);
51+
let psess = ParseSess::with_dcx(dcx, sm);
5252

53-
let mut parser = match maybe_new_parser_from_source_str(&sess, filename, code) {
53+
let mut parser = match maybe_new_parser_from_source_str(&psess, filename, code) {
5454
Ok(p) => p,
5555
Err(errs) => {
5656
errs.into_iter().for_each(Diag::cancel);

src/driver.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ fn test_arg_value() {
6868
assert_eq!(arg_value(args, "--foo", |_| true), None);
6969
}
7070

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((
7373
Symbol::intern("CLIPPY_ARGS"),
7474
args_env_var.as_deref().map(Symbol::intern),
7575
));
7676
}
7777

7878
/// Track files that may be accessed at runtime in `file_depinfo` so that cargo will re-run clippy
7979
/// 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();
8282

8383
// Used by `clippy::cargo` lints and to determine the MSRV. `cargo clippy` executes `clippy-driver`
8484
// with the current directory set to `CARGO_MANIFEST_DIR` so a relative path is fine
@@ -115,8 +115,8 @@ struct RustcCallbacks {
115115
impl rustc_driver::Callbacks for RustcCallbacks {
116116
fn config(&mut self, config: &mut interface::Config) {
117117
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);
120120
}));
121121
}
122122
}
@@ -132,13 +132,13 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
132132
let conf_path = clippy_config::lookup_conf_file();
133133
let previous = config.register_lints.take();
134134
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);
138138

139139
// Trigger a rebuild if CLIPPY_CONF_DIR changes. The value must be a valid string so
140140
// 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((
142142
Symbol::intern("CLIPPY_CONF_DIR"),
143143
env::var("CLIPPY_CONF_DIR").ok().map(|dir| Symbol::intern(&dir)),
144144
));

0 commit comments

Comments
 (0)