diff options
| author | bors <bors@rust-lang.org> | 2024-10-07 11:30:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-07 11:30:33 +0000 |
| commit | 7caad6925314911eefe54b040d4bc5be940e8f92 (patch) | |
| tree | 2f684b45872dfefad4784760ab3077c529659176 /compiler/rustc_lint/src | |
| parent | 0b16baa570d26224612ea27f76d68e4c6ca135cc (diff) | |
| parent | fd2278d017e3a06efb9ee8698dcd4a5b95d2482d (diff) | |
| download | rust-7caad6925314911eefe54b040d4bc5be940e8f92.tar.gz rust-7caad6925314911eefe54b040d4bc5be940e8f92.zip | |
Auto merge of #131354 - matthiaskrgr:rollup-hprnng2, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #131331 (Revert "warn_old_master_branch" check) - #131344 (Avoid `&Lrc<T>` in various places) - #131346 (Restrict `ignore-mode-*` directives) - #131353 (Add documentation for `runtest::check_rustdoc_test_option` method) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/late.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/late.rs b/compiler/rustc_lint/src/late.rs index de401397150..6d5903ac467 100644 --- a/compiler/rustc_lint/src/late.rs +++ b/compiler/rustc_lint/src/late.rs @@ -18,7 +18,7 @@ use std::any::Any; use std::cell::Cell; use rustc_data_structures::stack::ensure_sufficient_stack; -use rustc_data_structures::sync::{Lrc, join}; +use rustc_data_structures::sync::join; use rustc_hir as hir; use rustc_hir::def_id::{LocalDefId, LocalModDefId}; use rustc_hir::{HirId, intravisit as hir_visit}; @@ -36,8 +36,7 @@ use crate::{LateContext, LateLintPass, LintStore}; /// /// This function exists because [`Session::lint_store`] is type-erased. pub fn unerased_lint_store(sess: &Session) -> &LintStore { - let store: &Lrc<_> = sess.lint_store.as_ref().unwrap(); - let store: &dyn Any = &**store; + let store: &dyn Any = sess.lint_store.as_deref().unwrap(); store.downcast_ref().unwrap() } |
