fix clippy warnings
This commit is contained in:
parent
f5aa3131b4
commit
6ba56ac7b9
@ -413,7 +413,7 @@ pub fn before_memory_write<'tcx>(
|
||||
alloc_id: AllocId,
|
||||
prov_extra: ProvenanceExtra,
|
||||
range: AllocRange,
|
||||
machine: &mut MiriMachine<'_, 'tcx>,
|
||||
machine: &MiriMachine<'_, 'tcx>,
|
||||
) -> InterpResult<'tcx> {
|
||||
match self {
|
||||
AllocState::StackedBorrows(sb) =>
|
||||
@ -434,7 +434,7 @@ pub fn before_memory_deallocation<'tcx>(
|
||||
alloc_id: AllocId,
|
||||
prov_extra: ProvenanceExtra,
|
||||
range: AllocRange,
|
||||
machine: &mut MiriMachine<'_, 'tcx>,
|
||||
machine: &MiriMachine<'_, 'tcx>,
|
||||
) -> InterpResult<'tcx> {
|
||||
match self {
|
||||
AllocState::StackedBorrows(sb) =>
|
||||
|
@ -244,7 +244,7 @@ fn find_first_write_incompatible(&self, granting: usize) -> usize {
|
||||
fn item_invalidated(
|
||||
item: &Item,
|
||||
global: &GlobalStateInner,
|
||||
dcx: &mut DiagnosticCx<'_, '_, '_, 'tcx>,
|
||||
dcx: &DiagnosticCx<'_, '_, '_, 'tcx>,
|
||||
cause: ItemInvalidationCause,
|
||||
) -> InterpResult<'tcx> {
|
||||
if !global.tracked_pointer_tags.is_empty() {
|
||||
@ -575,7 +575,7 @@ pub fn before_memory_write<'tcx>(
|
||||
alloc_id: AllocId,
|
||||
tag: ProvenanceExtra,
|
||||
range: AllocRange,
|
||||
machine: &mut MiriMachine<'_, 'tcx>,
|
||||
machine: &MiriMachine<'_, 'tcx>,
|
||||
) -> InterpResult<'tcx> {
|
||||
trace!(
|
||||
"write access with tag {:?}: {:?}, size {}",
|
||||
@ -596,7 +596,7 @@ pub fn before_memory_deallocation<'tcx>(
|
||||
alloc_id: AllocId,
|
||||
tag: ProvenanceExtra,
|
||||
range: AllocRange,
|
||||
machine: &mut MiriMachine<'_, 'tcx>,
|
||||
machine: &MiriMachine<'_, 'tcx>,
|
||||
) -> InterpResult<'tcx> {
|
||||
trace!("deallocation with tag {:?}: {:?}, size {}", tag, alloc_id, range.size.bytes());
|
||||
let dcx = DiagnosticCxBuilder::dealloc(machine, tag);
|
||||
|
@ -18,14 +18,14 @@
|
||||
const PTHREAD_MUTEX_NORMAL_FLAG: i32 = 0x8000000;
|
||||
|
||||
fn is_mutex_kind_default<'mir, 'tcx: 'mir>(
|
||||
ecx: &mut MiriInterpCx<'mir, 'tcx>,
|
||||
ecx: &MiriInterpCx<'mir, 'tcx>,
|
||||
kind: i32,
|
||||
) -> InterpResult<'tcx, bool> {
|
||||
Ok(kind == ecx.eval_libc_i32("PTHREAD_MUTEX_DEFAULT"))
|
||||
}
|
||||
|
||||
fn is_mutex_kind_normal<'mir, 'tcx: 'mir>(
|
||||
ecx: &mut MiriInterpCx<'mir, 'tcx>,
|
||||
ecx: &MiriInterpCx<'mir, 'tcx>,
|
||||
kind: i32,
|
||||
) -> InterpResult<'tcx, bool> {
|
||||
let mutex_normal_kind = ecx.eval_libc_i32("PTHREAD_MUTEX_NORMAL");
|
||||
|
Loading…
Reference in New Issue
Block a user