1
Fork 0

Box thir::ExprKind::InlineAsm.

This shrinks `thir::Expr`.
This commit is contained in:
Nicholas Nethercote 2022-08-24 12:16:01 +10:00
parent b3245a8dff
commit e57ac764b8
4 changed files with 15 additions and 12 deletions

View file

@ -400,7 +400,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
);
block.unit()
}
ExprKind::InlineAsm { template, ref operands, options, line_spans } => {
ExprKind::InlineAsm(box InlineAsmExpr { template, ref operands, options, line_spans }) => {
use rustc_middle::{mir, thir};
let operands = operands
.into_iter()

View file

@ -562,7 +562,7 @@ impl<'tcx> Cx<'tcx> {
self.convert_path_expr(expr, res)
}
hir::ExprKind::InlineAsm(ref asm) => ExprKind::InlineAsm {
hir::ExprKind::InlineAsm(ref asm) => ExprKind::InlineAsm(Box::new(InlineAsmExpr {
template: asm.template,
operands: asm
.operands
@ -621,7 +621,7 @@ impl<'tcx> Cx<'tcx> {
.collect(),
options: asm.options,
line_spans: asm.line_spans,
},
})),
hir::ExprKind::ConstBlock(ref anon_const) => {
let ty = self.typeck_results().node_type(anon_const.hir_id);