1
Fork 0

review feedback

This commit is contained in:
Ralf Jung 2022-07-05 17:38:46 -04:00
parent 052651dd13
commit ac265cdc19
11 changed files with 15 additions and 21 deletions

View file

@ -61,7 +61,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
inferred_ty: ty,
})
});
let literal = ConstantKind::Val(ConstValue::ZST, ty);
let literal = ConstantKind::Val(ConstValue::Zst, ty);
Constant { span, user_ty: user_ty, literal }
}

View file

@ -799,7 +799,7 @@ impl<'tcx> Cx<'tcx> {
}
};
let ty = self.tcx().mk_fn_def(def_id, substs);
Expr { temp_lifetime, ty, span, kind: ExprKind::zero_sized_literal(user_ty) }
Expr { temp_lifetime, ty, span, kind: ExprKind::ZstLiteral { user_ty } }
}
fn convert_arm(&mut self, arm: &'tcx hir::Arm<'tcx>) -> ArmId {
@ -828,7 +828,7 @@ impl<'tcx> Cx<'tcx> {
| Res::Def(DefKind::Ctor(_, CtorKind::Fn), _)
| Res::SelfCtor(_) => {
let user_ty = self.user_substs_applied_to_res(expr.hir_id, res);
ExprKind::zero_sized_literal(user_ty)
ExprKind::ZstLiteral { user_ty }
}
Res::Def(DefKind::ConstParam, def_id) => {