diff options
| author | Vincent Esche <regexident@gmail.com> | 2018-11-01 11:52:44 +0100 |
|---|---|---|
| committer | Vincent Esche <regexident@gmail.com> | 2018-11-01 11:52:44 +0100 |
| commit | 0d38b0ec9a47cf571ab2af1ca6456593e174e678 (patch) | |
| tree | 93ed7bb0ef4dabfcef63b0f7dd9147b177ee9978 /src | |
| parent | c613d26ee2ed801f775af9872062775ab89609ac (diff) | |
| download | rust-0d38b0ec9a47cf571ab2af1ca6456593e174e678.tar.gz rust-0d38b0ec9a47cf571ab2af1ca6456593e174e678.zip | |
Made doc example of `impl Default for …` use `-> Self` instead of explicit self type
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/default.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/default.rs b/src/libcore/default.rs index ab36e29b1e1..638acebd617 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")] |
