Skip to content

Commit c32456d

Browse files
committed
Fix type error with ? in existing code.
1 parent 5aa89d8 commit c32456d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/ty/relate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ pub fn relate_substs<'a, 'gcx, 'tcx, R>(relation: &mut R,
151151
let b_ty = &b_subst.types[i];
152152
let variance = variances.map_or(ty::Invariant, |v| v.types[i]);
153153
relation.relate_with_variance(variance, a_ty, b_ty)
154-
}).collect()?;
154+
}).collect::<Result<_, _>>()?;
155155

156156
let regions = a_subst.regions.iter().enumerate().map(|(i, a_r)| {
157157
let b_r = &b_subst.regions[i];
158158
let variance = variances.map_or(ty::Invariant, |v| v.regions[i]);
159159
relation.relate_with_variance(variance, a_r, b_r)
160-
}).collect()?;
160+
}).collect::<Result<_, _>>()?;
161161

162162
Ok(Substs::new(tcx, types, regions))
163163
}

0 commit comments

Comments
 (0)