fix type renaming

This commit is contained in:
Ralf Jung 2018-08-23 09:29:27 +02:00
parent ee7f22245d
commit 68194180a8

View File

@ -60,7 +60,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
// Return None, as it doesn't make sense to return Some, because miri detects stack overflow itself.
let (return_place, return_to_block) = destination.unwrap();
match return_place.layout.ty.sty {
ty::TyAdt(ref adt_def, _) => {
ty::Adt(ref adt_def, _) => {
assert!(adt_def.is_enum(), "Unexpected return type for {}", item_path);
let none_variant_index = adt_def.variants.iter().position(|def| {
def.name.as_str() == "None"