Introduce ConstValue and use it instead of miri's Value for constant values

This commit is contained in:
John Kåre Alsaker 2018-04-26 09:18:19 +02:00
parent 41707d8df9
commit fdd9787777
55 changed files with 999 additions and 751 deletions

View file

@ -182,7 +182,7 @@ impl<'a, 'gcx, 'lcx, 'tcx> ty::TyS<'tcx> {
ty::TyAdt(def, _) => format!("{} `{}`", def.descr(), tcx.item_path_str(def.did)),
ty::TyForeign(def_id) => format!("extern type `{}`", tcx.item_path_str(def_id)),
ty::TyArray(_, n) => {
match n.val.to_raw_bits() {
match n.assert_usize(tcx) {
Some(n) => format!("array of {} elements", n),
None => "array".to_string(),
}