Skip to content

Commit

Permalink
Rollup merge of #55578 - regexident:fix/self, r=frewsxcv
Browse files Browse the repository at this point in the history
Made doc example of `impl Default for …` use `-> Self` instead of explicit self type

There is no need to state the explicit type of `self`.
  • Loading branch information
kennytm committed Nov 1, 2018
2 parents 1a25f22 + 0d38b0e commit f76a8e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
/// }
///
/// impl Default for Kind {
/// fn default() -> Kind { Kind::A }
/// fn default() -> Self { Kind::A }
/// }
/// ```
///
Expand Down Expand Up @@ -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")]
Expand Down

0 comments on commit f76a8e3

Please sign in to comment.