From 45bad64ab43bd5af4ef6d540294c81e6bb4f89be Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 17 Nov 2023 15:21:00 -0500 Subject: [PATCH] rustc_lint: remove superfluous assertion `Option::unwrap` is called on the next line. --- compiler/rustc_lint/src/late.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/rustc_lint/src/late.rs b/compiler/rustc_lint/src/late.rs index 551fe23f9f1..b47b3d41b12 100644 --- a/compiler/rustc_lint/src/late.rs +++ b/compiler/rustc_lint/src/late.rs @@ -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()