cleanup op_to_const a bit; rename ConstValue::ByRef → Indirect
This commit is contained in:
parent
551f481ffb
commit
0f8908da27
14 changed files with 40 additions and 47 deletions
|
@ -2914,7 +2914,7 @@ fn pretty_print_const_value<'tcx>(
|
|||
_ => {}
|
||||
}
|
||||
}
|
||||
(ConstValue::ByRef { alloc_id, offset }, ty::Array(t, n)) if *t == u8_type => {
|
||||
(ConstValue::Indirect { alloc_id, offset }, ty::Array(t, n)) if *t == u8_type => {
|
||||
let n = n.try_to_target_usize(tcx).unwrap();
|
||||
let alloc = tcx.global_alloc(alloc_id).unwrap_memory();
|
||||
// cast is ok because we already checked for pointer size (32 or 64 bit) above
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue