From 0d38b0ec9a47cf571ab2af1ca6456593e174e678 Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Thu, 1 Nov 2018 11:52:44 +0100 Subject: [PATCH] =?UTF-8?q?Made=20doc=20example=20of=20`impl=20Default=20f?= =?UTF-8?q?or=20=E2=80=A6`=20use=20`->=20Self`=20instead=20of=20explicit?= =?UTF-8?q?=20self=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libcore/default.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/default.rs b/src/libcore/default.rs index ab36e29b1e1d4..638acebd617bf 100644 --- a/src/libcore/default.rs +++ b/src/libcore/default.rs @@ -76,7 +76,7 @@ /// } /// /// impl Default for Kind { -/// fn default() -> Kind { Kind::A } +/// fn default() -> Self { Kind::A } /// } /// ``` /// @@ -118,7 +118,7 @@ pub trait Default: Sized { /// } /// /// impl Default for Kind { - /// fn default() -> Kind { Kind::A } + /// fn default() -> Self { Kind::A } /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")]