Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fd0cddf

Browse files
committed
internal: move strip_references into dyn trait check
1 parent b132190 commit fd0cddf

File tree

1 file changed

+2
-2
lines changed
  • crates/hir-ty/src/diagnostics

1 file changed

+2
-2
lines changed

crates/hir-ty/src/diagnostics/expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl ExprValidator {
160160
});
161161
}
162162

163-
let receiver_ty = self.infer[*receiver].strip_references().clone();
163+
let receiver_ty = self.infer[*receiver].clone();
164164
checker.prev_receiver_ty = Some(receiver_ty);
165165
}
166166
}
@@ -443,7 +443,7 @@ impl FilterMapNextChecker {
443443
if *function_id == self.next_function_id? {
444444
if let Some(prev_filter_map_expr_id) = self.prev_filter_map_expr_id {
445445
let is_dyn_trait =
446-
self.prev_receiver_ty.clone().map_or(false, |it| it.dyn_trait().is_some());
446+
self.prev_receiver_ty.as_ref().map_or(false, |it| it.strip_references().dyn_trait().is_some());
447447
if *receiver_expr_id == prev_filter_map_expr_id && !is_dyn_trait {
448448
return Some(());
449449
}

0 commit comments

Comments
 (0)