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 9f5a3cc commit 04a08c6Copy full SHA for 04a08c6
src/libcore/ptr.rs
@@ -407,6 +407,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
407
/// // this point, `s` must no longer be used, as the underlying memory has
408
/// // been freed.
409
/// s2 = String::default();
410
+/// assert_eq!(s2, "");
411
///
412
/// // Assigning to `s` would cause the old value to be dropped again,
413
/// // resulting in undefined behavior.
0 commit comments