]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/mem/mod.rs
Clean up E0207 explanation
[rust.git] / src / libcore / mem / mod.rs
index db5d2650331f47c92faed8d17e333f19cdb84714..9eb151cf528a5c3cfea721e5a80ee18fa97fea9b 100644 (file)
@@ -557,7 +557,7 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
     }
 }
 
-/// Replace `dest` with the default value of `T`, and return the previous `dest` value.
+/// Replaces `dest` with the default value of `T`, returning the previous `dest` value.
 ///
 /// # Examples
 ///
@@ -745,7 +745,7 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
 /// [`Copy`]: ../../std/marker/trait.Copy.html
 #[inline]
 #[stable(feature = "rust1", since = "1.0.0")]
-pub fn drop<T>(_x: T) { }
+pub fn drop<T>(_x: T) {}
 
 /// Interprets `src` as having type `&U`, and then reads `src` without moving
 /// the contained value.
@@ -834,9 +834,7 @@ fn hash<H: hash::Hasher>(&self, state: &mut H) {
 #[stable(feature = "discriminant_value", since = "1.21.0")]
 impl<T> fmt::Debug for Discriminant<T> {
     fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
-        fmt.debug_tuple("Discriminant")
-           .field(&self.0)
-           .finish()
+        fmt.debug_tuple("Discriminant").field(&self.0).finish()
     }
 }