rustc_lint: remove superfluous assertion
`Option::unwrap` is called on the next line.
This commit is contained in:
parent
6d2b84b3ed
commit
45bad64ab4
@ -33,7 +33,6 @@ use std::cell::Cell;
|
|||||||
/// Extract the `LintStore` from the query context.
|
/// Extract the `LintStore` from the query context.
|
||||||
/// This function exists because we've erased `LintStore` as `dyn Any` in the session.
|
/// This function exists because we've erased `LintStore` as `dyn Any` in the session.
|
||||||
pub fn unerased_lint_store(sess: &Session) -> &LintStore {
|
pub fn unerased_lint_store(sess: &Session) -> &LintStore {
|
||||||
assert!(sess.lint_store.is_some());
|
|
||||||
let store: &Lrc<_> = sess.lint_store.as_ref().unwrap();
|
let store: &Lrc<_> = sess.lint_store.as_ref().unwrap();
|
||||||
let store: &dyn Any = &**store;
|
let store: &dyn Any = &**store;
|
||||||
store.downcast_ref().unwrap()
|
store.downcast_ref().unwrap()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user