Skip to content

Commit 70398d5

Browse files
MIR: Make Mir take ownership of InlineAsm values.
1 parent 33d2970 commit 70398d5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustc/mir/repr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ pub enum Rvalue<'tcx> {
584584
from_end: usize,
585585
},
586586

587-
InlineAsm(&'tcx InlineAsm),
587+
InlineAsm(InlineAsm),
588588
}
589589

590590
#[derive(Clone, Debug, PartialEq, Eq)]

src/librustc_mir/build/expr/as_rvalue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
4040
this.in_scope(extent, block, |this| this.as_rvalue(block, value))
4141
}
4242
ExprKind::InlineAsm { asm } => {
43-
block.and(Rvalue::InlineAsm(asm))
43+
block.and(Rvalue::InlineAsm(asm.clone()))
4444
}
4545
ExprKind::Repeat { value, count } => {
4646
let value_operand = unpack!(block = this.as_operand(block, value));

src/librustc_trans/trans/mir/rvalue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
120120
bcx
121121
}
122122

123-
mir::Rvalue::InlineAsm(inline_asm) => {
123+
mir::Rvalue::InlineAsm(ref inline_asm) => {
124124
asm::trans_inline_asm(bcx, inline_asm)
125125
}
126126

0 commit comments

Comments
 (0)