remove unnecessary loop
This commit is contained in:
parent
a7fc463dd8
commit
f8fe978fab
1 changed files with 1 additions and 7 deletions
|
@ -371,14 +371,8 @@ impl RpitConstraintChecker<'_> {
|
||||||
// Use borrowck to get the type with unerased regions.
|
// Use borrowck to get the type with unerased regions.
|
||||||
let concrete_opaque_types = &self.tcx.mir_borrowck(def_id).concrete_opaque_types;
|
let concrete_opaque_types = &self.tcx.mir_borrowck(def_id).concrete_opaque_types;
|
||||||
debug!(?concrete_opaque_types);
|
debug!(?concrete_opaque_types);
|
||||||
for (&def_id, &concrete_type) in concrete_opaque_types {
|
if let Some(&concrete_type) = concrete_opaque_types.get(&self.def_id) {
|
||||||
if def_id != self.def_id {
|
|
||||||
// Ignore constraints for other opaque types.
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
debug!(?concrete_type, "found constraint");
|
debug!(?concrete_type, "found constraint");
|
||||||
|
|
||||||
if concrete_type.ty != self.found.ty {
|
if concrete_type.ty != self.found.ty {
|
||||||
if let Ok(d) = self.found.build_mismatch_error(&concrete_type, self.tcx) {
|
if let Ok(d) = self.found.build_mismatch_error(&concrete_type, self.tcx) {
|
||||||
d.emit();
|
d.emit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue