diff options
| author | Ralf Jung <post@ralfj.de> | 2018-12-19 14:11:01 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-12-19 14:11:01 +0100 |
| commit | 81a45e20385009db9b964be3ed18801477f0a3dc (patch) | |
| tree | 0c2da60ac4050aff9a4033af0ef38f48941eeffa /src/librustc_mir/transform | |
| parent | cb84844e83ee88684ef89cc02221a26abbf92530 (diff) | |
| download | rust-81a45e20385009db9b964be3ed18801477f0a3dc.tar.gz rust-81a45e20385009db9b964be3ed18801477f0a3dc.zip | |
miri: allocation is infallible
Diffstat (limited to 'src/librustc_mir/transform')
| -rw-r--r-- | src/librustc_mir/transform/const_prop.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index acae03f7f94..cfa899eb5a6 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -346,7 +346,7 @@ impl<'a, 'mir, 'tcx> ConstPropagator<'a, 'mir, 'tcx> { Rvalue::Cast(kind, ref operand, _) => { let (op, span) = self.eval_operand(operand, source_info)?; self.use_ecx(source_info, |this| { - let dest = this.ecx.allocate(place_layout, MemoryKind::Stack)?; + let dest = this.ecx.allocate(place_layout, MemoryKind::Stack); this.ecx.cast(op, kind, dest.into())?; Ok((dest.into(), span)) }) |
