File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1820,7 +1820,7 @@ mod true_keyword {}
18201820
18211821#[ doc( keyword = "type" ) ]
18221822//
1823- /// Define an alias for an existing type.
1823+ /// Define an [ alias] for an existing type.
18241824///
18251825/// The syntax is `type Name = ExistingType;`.
18261826///
@@ -1838,6 +1838,13 @@ mod true_keyword {}
18381838/// assert_eq!(m, k);
18391839/// ```
18401840///
1841+ /// A type can be generic:
1842+ ///
1843+ /// ```rust
1844+ /// # use std::sync::{Arc, Mutex};
1845+ /// type ArcMutex<T> = Arc<Mutex<T>>;
1846+ /// ```
1847+ ///
18411848/// In traits, `type` is used to declare an [associated type]:
18421849///
18431850/// ```rust
@@ -1860,6 +1867,7 @@ mod true_keyword {}
18601867///
18611868/// [`trait`]: keyword.trait.html
18621869/// [associated type]: ../reference/items/associated-items.html#associated-types
1870+ /// [alias]: ../reference/items/type-aliases.html
18631871mod type_keyword { }
18641872
18651873#[ doc( keyword = "unsafe" ) ]
You can’t perform that action at this time.
0 commit comments