Fix unused variable warning in doctest

This commit is contained in:
Dylan MacKenzie 2018-05-24 09:05:56 -07:00 committed by Ralf Jung
parent 9f5a3cccb8
commit 04a08c60a1

View File

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