Skip to content

Commit

Permalink
Add missing pinning metadata to mock_vm (#1121)
Browse files Browse the repository at this point in the history
If the "object_pinning" feature is enabled, we add the
`LOCAL_PINNING_BIT_SPEC` constant when implementing `ObjectModel` for
`MockVM`. That fixes compilation error if we attempt to run `cargo
clippy` with many features including both "mock_test" and
"object_pinning", although we currently don't do mock tests for the
pinning metadata.
  • Loading branch information
wks authored Apr 17, 2024
1 parent fc35498 commit 1bfd558
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util/test_util/mock_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ impl crate::vm::ObjectModel<MockVM> for MockVM {
const LOCAL_LOS_MARK_NURSERY_SPEC: VMLocalLOSMarkNurserySpec =
VMLocalLOSMarkNurserySpec::in_header(0);

#[cfg(feature = "object_pinning")]
const LOCAL_PINNING_BIT_SPEC: VMLocalPinningBitSpec = VMLocalPinningBitSpec::in_header(0);

const OBJECT_REF_OFFSET_LOWER_BOUND: isize = DEFAULT_OBJECT_REF_OFFSET as isize;

fn copy(
Expand Down

0 comments on commit 1bfd558

Please sign in to comment.