rustc_lint: remove superfluous assertion

`Option::unwrap` is called on the next line.
This commit is contained in:
Tamir Duberstein 2023-11-17 15:21:00 -05:00
parent 6d2b84b3ed
commit 45bad64ab4
No known key found for this signature in database

View File

@ -33,7 +33,6 @@ use std::cell::Cell;
/// Extract the `LintStore` from the query context.
/// This function exists because we've erased `LintStore` as `dyn Any` in the session.
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: &dyn Any = &**store;
store.downcast_ref().unwrap()