We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eecae1d commit de165bbCopy full SHA for de165bb
src/libcore/ptr.rs
@@ -394,6 +394,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
394
/// // this point, `s` must no longer be used, as the underlying memory has
395
/// // been freed.
396
/// s2 = String::default();
397
+/// assert_eq!(s2, "");
398
///
399
/// // Assigning to `s` would cause the old value to be dropped again,
400
/// // resulting in undefined behavior.
0 commit comments