From 04a08c60a193e81bc82fa6af05dc4d7e5371e0ab Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Thu, 24 May 2018 09:05:56 -0700 Subject: [PATCH] Fix unused variable warning in doctest --- src/libcore/ptr.rs | 1 + 1 file changed, 1 insertion(+) 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.