add special case for typeof fallback

This commit is contained in:
Jane Lusby 2021-04-23 13:28:17 -07:00
parent a49b746da4
commit 81e4d5f96c

View File

@ -540,6 +540,12 @@ fn typeck_with_fallback<'tcx>(
kind: TypeVariableOriginKind::TypeInference,
span,
}),
Node::Ty(&hir::Ty {
kind: hir::TyKind::Typeof(ref anon_const), ..
}) if anon_const.hir_id == id => fcx.next_ty_var(TypeVariableOrigin {
kind: TypeVariableOriginKind::TypeInference,
span,
}),
Node::Expr(&hir::Expr { kind: hir::ExprKind::InlineAsm(ia), .. })
if ia.operands.iter().any(|(op, _op_sp)| match op {
hir::InlineAsmOperand::Const { anon_const } => {