make return type of get_alloc_info a struct, and reduce some code duplication with validity checking
This commit is contained in:
parent
30a2ae6f05
commit
4a54ec8c18
11 changed files with 190 additions and 177 deletions
|
@ -472,8 +472,9 @@ fn report_validation_error<'tcx>(
|
|||
backtrace.print_backtrace();
|
||||
|
||||
let bytes = ecx.print_alloc_bytes_for_diagnostics(alloc_id);
|
||||
let (size, align, ..) = ecx.get_alloc_info(alloc_id);
|
||||
let raw_bytes = errors::RawBytesNote { size: size.bytes(), align: align.bytes(), bytes };
|
||||
let info = ecx.get_alloc_info(alloc_id);
|
||||
let raw_bytes =
|
||||
errors::RawBytesNote { size: info.size.bytes(), align: info.align.bytes(), bytes };
|
||||
|
||||
crate::const_eval::report(
|
||||
*ecx.tcx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue