We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent deb9d38 commit 2986cc0Copy full SHA for 2986cc0
library/core/src/ptr/mod.rs
@@ -1634,6 +1634,7 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
1634
// `dst` cannot overlap `src` because the caller has mutable access
1635
// to `dst` while `src` is owned by this function.
1636
unsafe {
1637
+ #[cfg(debug_assertions)]
1638
ub_checks::assert_unsafe_precondition!(
1639
check_language_ub,
1640
"ptr::write requires that the pointer argument is aligned and non-null",
0 commit comments