This commit is contained in:
nora 2022-04-03 14:58:01 +02:00
parent 22ca118481
commit 583b3c3a86
3 changed files with 197 additions and 15 deletions

View file

@ -325,6 +325,7 @@ mod tests {
}
#[test]
#[allow(clippy::redundant_clone)]
fn clone() {
let mut unit = ();
let stuffed_ptr1: StuffedPtr<(), PanicsInDrop> = StuffedPtr::new_ptr(&mut unit);

View file

@ -15,9 +15,7 @@ unsafe impl StuffingStrategy for () {
0
}
unsafe fn extract_extra(_data: usize) -> Self::Extra {
()
}
unsafe fn extract_extra(_data: usize) -> Self::Extra {}
}
#[cfg(test)]
@ -35,6 +33,7 @@ pub(crate) mod test_strategies {
data == usize::MAX
}
#[allow(clippy::forget_copy)]
fn stuff_extra(inner: Self::Extra) -> usize {
std::mem::forget(inner);
usize::MAX