mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
remove unnecessary loop
This commit is contained in:
parent
a7fc463dd8
commit
f8fe978fab
@ -371,14 +371,8 @@ impl RpitConstraintChecker<'_> {
|
||||
// Use borrowck to get the type with unerased regions.
|
||||
let concrete_opaque_types = &self.tcx.mir_borrowck(def_id).concrete_opaque_types;
|
||||
debug!(?concrete_opaque_types);
|
||||
for (&def_id, &concrete_type) in concrete_opaque_types {
|
||||
if def_id != self.def_id {
|
||||
// Ignore constraints for other opaque types.
|
||||
continue;
|
||||
}
|
||||
|
||||
if let Some(&concrete_type) = concrete_opaque_types.get(&self.def_id) {
|
||||
debug!(?concrete_type, "found constraint");
|
||||
|
||||
if concrete_type.ty != self.found.ty {
|
||||
if let Ok(d) = self.found.build_mismatch_error(&concrete_type, self.tcx) {
|
||||
d.emit();
|
||||
|
Loading…
Reference in New Issue
Block a user