Skip to content

Commit 2123509

Browse files
committed
Remove an unnecessary &Lrc<_> local variable.
1 parent 860cbcc commit 2123509

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_lint/src/late.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::any::Any;
1818
use std::cell::Cell;
1919

2020
use rustc_data_structures::stack::ensure_sufficient_stack;
21-
use rustc_data_structures::sync::{Lrc, join};
21+
use rustc_data_structures::sync::join;
2222
use rustc_hir as hir;
2323
use rustc_hir::def_id::{LocalDefId, LocalModDefId};
2424
use rustc_hir::{HirId, intravisit as hir_visit};
@@ -36,8 +36,7 @@ use crate::{LateContext, LateLintPass, LintStore};
3636
///
3737
/// This function exists because [`Session::lint_store`] is type-erased.
3838
pub fn unerased_lint_store(sess: &Session) -> &LintStore {
39-
let store: &Lrc<_> = sess.lint_store.as_ref().unwrap();
40-
let store: &dyn Any = &**store;
39+
let store: &dyn Any = sess.lint_store.as_deref().unwrap();
4140
store.downcast_ref().unwrap()
4241
}
4342

0 commit comments

Comments
 (0)