Rustup to rustc 1.39.0-nightly (9b91b9c10 2019-08-26)

This commit is contained in:
bjorn3 2019-08-27 11:01:36 +02:00
parent e704eb5259
commit b9dc950a11
2 changed files with 11 additions and 8 deletions

View file

@ -54,13 +54,14 @@ pub fn codegen_static_ref<'tcx>(
pub fn trans_promoted<'tcx>(
fx: &mut FunctionCx<'_, 'tcx, impl Backend>,
instance: Instance<'tcx>,
promoted: Promoted,
dest_ty: Ty<'tcx>,
) -> CPlace<'tcx> {
match fx
.tcx
.const_eval(ParamEnv::reveal_all().and(GlobalId {
instance: fx.instance,
instance,
promoted: Some(promoted),
}))
{
@ -461,10 +462,11 @@ pub fn mir_operand_get_const_val<'tcx>(
};
Some(match &static_.kind {
StaticKind::Static(_) => unimplemented!(),
StaticKind::Promoted(promoted) => {
StaticKind::Static => unimplemented!(),
StaticKind::Promoted(promoted, substs) => {
let instance = Instance::new(static_.def_id, fx.monomorphize(substs));
fx.tcx.const_eval(ParamEnv::reveal_all().and(GlobalId {
instance: fx.instance,
instance,
promoted: Some(*promoted),
})).unwrap()
}