File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1820,7 +1820,7 @@ mod true_keyword {}
1820
1820
1821
1821
#[ doc( keyword = "type" ) ]
1822
1822
//
1823
- /// Define an alias for an existing type.
1823
+ /// Define an [ alias] for an existing type.
1824
1824
///
1825
1825
/// The syntax is `type Name = ExistingType;`.
1826
1826
///
@@ -1838,6 +1838,13 @@ mod true_keyword {}
1838
1838
/// assert_eq!(m, k);
1839
1839
/// ```
1840
1840
///
1841
+ /// A type can be generic:
1842
+ ///
1843
+ /// ```rust
1844
+ /// # use std::sync::{Arc, Mutex};
1845
+ /// type ArcMutex<T> = Arc<Mutex<T>>;
1846
+ /// ```
1847
+ ///
1841
1848
/// In traits, `type` is used to declare an [associated type]:
1842
1849
///
1843
1850
/// ```rust
@@ -1860,6 +1867,7 @@ mod true_keyword {}
1860
1867
///
1861
1868
/// [`trait`]: keyword.trait.html
1862
1869
/// [associated type]: ../reference/items/associated-items.html#associated-types
1870
+ /// [alias]: ../reference/items/type-aliases.html
1863
1871
mod type_keyword { }
1864
1872
1865
1873
#[ doc( keyword = "unsafe" ) ]
You can’t perform that action at this time.
0 commit comments