From: Dylan MacKenzie Date: Thu, 24 May 2018 16:05:56 +0000 (-0700) Subject: Fix unused variable warning in doctest X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=04a08c60a193e81bc82fa6af05dc4d7e5371e0ab;p=rust.git Fix unused variable warning in doctest --- diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index eaff3093767..e02ee09c8af 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -407,6 +407,7 @@ pub unsafe fn replace(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.