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
This commit is contained in:
commit
7caad69253
23 changed files with 53 additions and 128 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue