Skip to content

Commit

Permalink
Auto merge of #129809 - matthiaskrgr:rollup-cyygnxh, r=matthiaskrgr
Browse files Browse the repository at this point in the history
Rollup of 15 pull requests

Successful merges:

 - #120221 (Don't make statement nonterminals match pattern nonterminals)
 - #126183 (Separate core search logic with search ui)
 - #129123 (rustdoc-json: Add test for `Self` type)
 - #129366 (linker: Synchronize native library search in rustc and linker)
 - #129527 (Don't use `TyKind` in a lint)
 - #129534 (Deny `wasm_c_abi` lint to nudge the last 25%)
 - #129640 (Re-enable android tests/benches in alloc/core)
 - #129642 (Bump backtrace to 0.3.74~ish)
 - #129675 (allow BufReader::peek to be called on unsized types)
 - #129723 (Simplify some extern providers)
 - #129724 (Remove `Option<!>` return types.)
 - #129725 (Stop using `ty::GenericPredicates` for non-predicates_of queries)
 - #129731 (Allow running `./x.py test compiler`)
 - #129751 (interpret/visitor: make memory order iteration slightly more efficient)
 - #129754 (wasi: Fix sleeping for `Duration::MAX`)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Aug 31, 2024
2 parents 4a23c9f + b353534 commit b226044
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,14 +630,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
self.ecx
}

fn aggregate_field_order(memory_index: &IndexVec<FieldIdx, u32>, idx: usize) -> usize {
// We need to do an *inverse* lookup: find the field that has position `idx` in memory order.
for (src_field, &mem_pos) in memory_index.iter_enumerated() {
if mem_pos as usize == idx {
return src_field.as_usize();
}
}
panic!("invalid `memory_index`, could not find {}-th field in memory order", idx);
fn aggregate_field_iter(
memory_index: &IndexVec<FieldIdx, u32>,
) -> impl Iterator<Item = FieldIdx> + 'static {
let inverse_memory_index = memory_index.invert_bijective_mapping();
inverse_memory_index.into_iter()
}

// Hook to detect `UnsafeCell`.
Expand Down

0 comments on commit b226044

Please sign in to comment.