Skip to content

Commit de165bb

Browse files
Fix unused variable warning in doctest
1 parent eecae1d commit de165bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/ptr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
394394
/// // this point, `s` must no longer be used, as the underlying memory has
395395
/// // been freed.
396396
/// s2 = String::default();
397+
/// assert_eq!(s2, "");
397398
///
398399
/// // Assigning to `s` would cause the old value to be dropped again,
399400
/// // resulting in undefined behavior.

0 commit comments

Comments
 (0)