Skip to content

Commit 04a08c6

Browse files
ecstatic-morseRalfJung
authored andcommitted
Fix unused variable warning in doctest
1 parent 9f5a3cc commit 04a08c6

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
@@ -407,6 +407,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
407407
/// // this point, `s` must no longer be used, as the underlying memory has
408408
/// // been freed.
409409
/// s2 = String::default();
410+
/// assert_eq!(s2, "");
410411
///
411412
/// // Assigning to `s` would cause the old value to be dropped again,
412413
/// // resulting in undefined behavior.

0 commit comments

Comments
 (0)