Skip to content

Commit

Permalink
Fix small nits, clarfying some confusing vocabulary and using more co…
Browse files Browse the repository at this point in the history
…nsistent wording
  • Loading branch information
poliorcetics committed Jul 16, 2020
1 parent ba6857d commit 8a2f147
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/libstd/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1355,18 +1355,24 @@ mod super_keyword {}
//
/// A common interface for a group of types.
///
/// A `trait` is an interface that types can implement. It is said they
/// "implement" the trait or "conform" to the trait.
/// A `trait` is like an interface that data types can implement. When a type
/// implements a trait it can be treated abstractly as that trait using generics
/// or trait objects.
///
/// This interface is made up of three varieties of items:
/// Traits can be made up of three varieties of associated items:
///
/// - functions
/// - functions and methods
/// - types
/// - constants
///
/// Traits may also contain additional type parameters. Those type parameters
/// or the trait itself can be constrained by other traits.
///
/// Traits can serve as markers or carry other logical semantics that
/// aren't expressed through their items. When a type implements that
/// trait it is promising to uphold its contract. [`Send`] and [`Sync`] are two
/// such marker traits present in the standard library.
///
/// See the [Reference][Ref-Traits] for a lot more information on traits.
///
/// # Examples
Expand Down Expand Up @@ -1525,6 +1531,8 @@ mod super_keyword {}
/// [`for`]: keyword.for.html
/// [`impl`]: keyword.impl.html
/// [`unsafe`]: keyword.unsafe.html
/// [`Send`]: marker/trait.Send.html
/// [`Sync`]: marker/trait.Sync.html
/// [Ref-Traits]: ../reference/items/traits.html
/// [Ref-Trait-Objects]: ../reference/types/trait-object.html
mod trait_keyword {}
Expand Down

0 comments on commit 8a2f147

Please sign in to comment.