Skip to content

Commit 155ef41

Browse files
Fix normalization error.
1 parent ba07bd5 commit 155ef41

File tree

1 file changed

+3
-1
lines changed
  • src/librustc_typeck/check

1 file changed

+3
-1
lines changed

src/librustc_typeck/check/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2122,10 +2122,12 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
21222122
Neither => {
21232123
if let Some(default) = default_map.get(ty) {
21242124
let default = default.clone();
2125+
let default_ty = self.normalize_associated_types_in(
2126+
default.origin_span, &default.ty);
21252127
match self.eq_types(false,
21262128
&self.misc(default.origin_span),
21272129
ty,
2128-
default.ty) {
2130+
default_ty) {
21292131
Ok(ok) => self.register_infer_ok_obligations(ok),
21302132
Err(_) => {
21312133
result = Some(default);

0 commit comments

Comments
 (0)