Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure/analysis.rs')
-rw-r--r--crates/hir-ty/src/infer/closure/analysis.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir-ty/src/infer/closure/analysis.rs b/crates/hir-ty/src/infer/closure/analysis.rs
index ce7931bb3c..979551f316 100644
--- a/crates/hir-ty/src/infer/closure/analysis.rs
+++ b/crates/hir-ty/src/infer/closure/analysis.rs
@@ -44,7 +44,7 @@ use macros::{TypeFoldable, TypeVisitable};
use rustc_ast_ir::Mutability;
use rustc_hash::{FxBuildHasher, FxHashMap};
use rustc_type_ir::{
- BoundVar, ClosureKind, TypeVisitableExt as _,
+ BoundVar, ClosureKind,
inherent::{AdtDef as _, GenericArgs as _, IntoKind as _, Ty as _},
};
use smallvec::{SmallVec, smallvec};
@@ -403,9 +403,7 @@ impl<'a, 'db> InferenceContext<'a, 'db> {
// For coroutine-closures, we additionally must compute the
// `coroutine_captures_by_ref_ty` type, which is used to generate the by-ref
// version of the coroutine-closure's output coroutine.
- if let UpvarArgs::CoroutineClosure(args) = args
- && !args.references_error()
- {
+ if let UpvarArgs::CoroutineClosure(args) = args {
let closure_env_region: Region<'_> = Region::new_bound(
self.interner(),
rustc_type_ir::INNERMOST,