Update const slice processing

This commit is contained in:
Oliver Scherer 2019-01-28 10:09:34 +01:00
parent 62f40e28b9
commit b08964b3bd

View File

@ -441,7 +441,7 @@ pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'
// FIXME: implement other conversion
_ => None,
},
ConstValue::ScalarPair(Scalar::Ptr(ptr), Scalar::Bits { bits: n, .. }) => match result.ty.sty {
ConstValue::Slice(Scalar::Ptr(ptr), n) => match result.ty.sty {
ty::Ref(_, tam, _) => match tam.sty {
ty::Str => {
let alloc = tcx.alloc_map.lock().unwrap_memory(ptr.alloc_id);