We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d748712 commit b2e6da7Copy full SHA for b2e6da7
src/librustc_typeck/check/wfcheck.rs
@@ -355,13 +355,13 @@ fn check_item_type<'a, 'tcx>(
355
) {
356
debug!("check_item_type: {:?}", item_id);
357
358
- for_id(tcx, item_id, ty_span).with_fcx(|fcx, _this| {
359
- let ty = fcx.tcx.type_of(fcx.tcx.hir.local_def_id(item_id));
+ for_id(tcx, item_id, ty_span).with_fcx(|fcx, gcx| {
+ let ty = gcx.type_of(gcx.hir.local_def_id(item_id));
360
let item_ty = fcx.normalize_associated_types_in(ty_span, &ty);
361
362
let mut forbid_unsized = true;
363
if allow_foreign_ty {
364
- if let TyKind::Foreign(_) = tcx.struct_tail(item_ty).sty {
+ if let TyKind::Foreign(_) = fcx.tcx.struct_tail(item_ty).sty {
365
forbid_unsized = false;
366
}
367
0 commit comments