about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlexis Bourget <alexis.bourget@gmail.com>2020-07-16 23:58:57 +0200
committerAlexis Bourget <alexis.bourget@gmail.com>2020-07-17 00:03:14 +0200
commit8a2f147b5b9756e67dc2299777b8b534bbd73d0b (patch)
treeb125a3accc99a9ffac2ee4a5e5a305546d4063ca /src/libstd
parentba6857d801b6217a190e92e43cacd8468ff2d72a (diff)
downloadrust-8a2f147b5b9756e67dc2299777b8b534bbd73d0b.tar.gz
rust-8a2f147b5b9756e67dc2299777b8b534bbd73d0b.zip
Fix small nits, clarfying some confusing vocabulary and using more consistent wording
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/keyword_docs.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs
index 7bedb6fd623..19f3503bb84 100644
--- a/src/libstd/keyword_docs.rs
+++ b/src/libstd/keyword_docs.rs
@@ -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
@@ -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 {}