Skip to content

Commit 2ea7361

Browse files
committed
Resolve conflicts
1 parent 577d275 commit 2ea7361

File tree

2 files changed

+35
-39
lines changed

2 files changed

+35
-39
lines changed

library/core/src/mem/mod.rs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,40 +1413,6 @@ pub macro offset_of($Container:ty, $($fields:expr)+ $(,)?) {
14131413
{builtin # offset_of($Container, $($fields)+)}
14141414
}
14151415

1416-
<<<<<<< HEAD
1417-
#[cfg(kani)]
1418-
#[unstable(feature = "kani", issue = "none")]
1419-
mod verify {
1420-
use super::*;
1421-
use crate::kani;
1422-
1423-
/// Use this type to ensure that mem swap does not drop the value.
1424-
#[derive(kani::Arbitrary)]
1425-
struct CannotDrop<T: kani::Arbitrary> {
1426-
inner: T,
1427-
}
1428-
1429-
impl<T: kani::Arbitrary> Drop for CannotDrop<T> {
1430-
fn drop(&mut self) {
1431-
unreachable!("Cannot drop")
1432-
}
1433-
}
1434-
1435-
#[kani::proof_for_contract(swap)]
1436-
pub fn check_swap_primitive() {
1437-
let mut x: u8 = kani::any();
1438-
let mut y: u8 = kani::any();
1439-
swap(&mut x, &mut y)
1440-
}
1441-
1442-
#[kani::proof_for_contract(swap)]
1443-
pub fn check_swap_adt_no_drop() {
1444-
let mut x: CannotDrop<char> = kani::any();
1445-
let mut y: CannotDrop<char> = kani::any();
1446-
swap(&mut x, &mut y);
1447-
forget(x);
1448-
forget(y);
1449-
=======
14501416
/// Create a fresh instance of the inhabited ZST type `T`.
14511417
///
14521418
/// Prefer this to [`zeroed`] or [`uninitialized`] or [`transmute_copy`]
@@ -1501,6 +1467,40 @@ pub const unsafe fn conjure_zst<T>() -> T {
15011467
unsafe {
15021468
#[allow(clippy::uninit_assumed_init)]
15031469
MaybeUninit::uninit().assume_init()
1504-
>>>>>>> subtree/library
1470+
}
1471+
}
1472+
1473+
#[cfg(kani)]
1474+
#[unstable(feature = "kani", issue = "none")]
1475+
mod verify {
1476+
use super::*;
1477+
use crate::kani;
1478+
1479+
/// Use this type to ensure that mem swap does not drop the value.
1480+
#[derive(kani::Arbitrary)]
1481+
struct CannotDrop<T: kani::Arbitrary> {
1482+
inner: T,
1483+
}
1484+
1485+
impl<T: kani::Arbitrary> Drop for CannotDrop<T> {
1486+
fn drop(&mut self) {
1487+
unreachable!("Cannot drop")
1488+
}
1489+
}
1490+
1491+
#[kani::proof_for_contract(swap)]
1492+
pub fn check_swap_primitive() {
1493+
let mut x: u8 = kani::any();
1494+
let mut y: u8 = kani::any();
1495+
swap(&mut x, &mut y)
1496+
}
1497+
1498+
#[kani::proof_for_contract(swap)]
1499+
pub fn check_swap_adt_no_drop() {
1500+
let mut x: CannotDrop<char> = kani::any();
1501+
let mut y: CannotDrop<char> = kani::any();
1502+
swap(&mut x, &mut y);
1503+
forget(x);
1504+
forget(y);
15051505
}
15061506
}

library/core/src/num/nonzero.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ use super::{IntErrorKind, ParseIntError};
66
use crate::clone::UseCloned;
77
use crate::cmp::Ordering;
88
use crate::hash::{Hash, Hasher};
9-
<<<<<<< HEAD
109
#[cfg(kani)]
1110
use crate::kani;
12-
use crate::marker::{Freeze, StructuralPartialEq};
13-
=======
1411
use crate::marker::{Destruct, Freeze, StructuralPartialEq};
15-
>>>>>>> subtree/library
1612
use crate::ops::{BitOr, BitOrAssign, Div, DivAssign, Neg, Rem, RemAssign};
1713
use crate::panic::{RefUnwindSafe, UnwindSafe};
1814
use crate::str::FromStr;

0 commit comments

Comments
 (0)