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