We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7265b93 + 95fe6ac commit aee21e2Copy full SHA for aee21e2
src/libcore/ptr.rs
@@ -74,7 +74,10 @@ pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
74
///
75
/// # Safety
76
77
-/// This is only unsafe because it accepts a raw pointer.
+/// This function copies the memory through the raw pointers passed to it
78
+/// as arguments.
79
+///
80
+/// Ensure that these pointers are valid before calling `swap`.
81
#[inline]
82
#[stable(feature = "rust1", since = "1.0.0")]
83
pub unsafe fn swap<T>(x: *mut T, y: *mut T) {
0 commit comments