Skip to content

Commit 8a2f147

Browse files
committed
Fix small nits, clarfying some confusing vocabulary and using more consistent wording
1 parent ba6857d commit 8a2f147

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/libstd/keyword_docs.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -1355,18 +1355,24 @@ mod super_keyword {}
13551355
//
13561356
/// A common interface for a group of types.
13571357
///
1358-
/// A `trait` is an interface that types can implement. It is said they
1359-
/// "implement" the trait or "conform" to the trait.
1358+
/// A `trait` is like an interface that data types can implement. When a type
1359+
/// implements a trait it can be treated abstractly as that trait using generics
1360+
/// or trait objects.
13601361
///
1361-
/// This interface is made up of three varieties of items:
1362+
/// Traits can be made up of three varieties of associated items:
13621363
///
1363-
/// - functions
1364+
/// - functions and methods
13641365
/// - types
13651366
/// - constants
13661367
///
13671368
/// Traits may also contain additional type parameters. Those type parameters
13681369
/// or the trait itself can be constrained by other traits.
13691370
///
1371+
/// Traits can serve as markers or carry other logical semantics that
1372+
/// aren't expressed through their items. When a type implements that
1373+
/// trait it is promising to uphold its contract. [`Send`] and [`Sync`] are two
1374+
/// such marker traits present in the standard library.
1375+
///
13701376
/// See the [Reference][Ref-Traits] for a lot more information on traits.
13711377
///
13721378
/// # Examples
@@ -1525,6 +1531,8 @@ mod super_keyword {}
15251531
/// [`for`]: keyword.for.html
15261532
/// [`impl`]: keyword.impl.html
15271533
/// [`unsafe`]: keyword.unsafe.html
1534+
/// [`Send`]: marker/trait.Send.html
1535+
/// [`Sync`]: marker/trait.Sync.html
15281536
/// [Ref-Traits]: ../reference/items/traits.html
15291537
/// [Ref-Trait-Objects]: ../reference/types/trait-object.html
15301538
mod trait_keyword {}

0 commit comments

Comments
 (0)