@@ -1028,8 +1028,6 @@ mod self_upper_keyword {}
1028
1028
1029
1029
#[ doc( keyword = "static" ) ]
1030
1030
//
1031
- /// A place that is valid for the duration of a program.
1032
- ///
1033
1031
/// A static item is a value which is valid for the entire duration of your
1034
1032
/// program (a `'static` lifetime).
1035
1033
///
@@ -1045,7 +1043,7 @@ mod self_upper_keyword {}
1045
1043
/// There are two types of `static` items: those declared in association with
1046
1044
/// the [`mut`] keyword and those without.
1047
1045
///
1048
- /// Items that are both static and owned cannot be moved:
1046
+ /// Static items cannot be moved:
1049
1047
///
1050
1048
/// ```rust,compile_fail,E0507
1051
1049
/// static VEC: Vec<u32> = vec![];
@@ -1054,6 +1052,7 @@ mod self_upper_keyword {}
1054
1052
/// v
1055
1053
/// }
1056
1054
///
1055
+ /// // This line causes an error
1057
1056
/// move_vec(VEC);
1058
1057
/// ```
1059
1058
///
@@ -1071,7 +1070,7 @@ mod self_upper_keyword {}
1071
1070
/// let r2 = &FOO as *const _;
1072
1071
/// // With a strictly read-only static, references will have the same adress
1073
1072
/// assert_eq!(r1, r2);
1074
- /// // A static item is used just like a variable
1073
+ /// // A static item can be used just like a variable in many cases
1075
1074
/// println!("{:?}", FOO);
1076
1075
/// ```
1077
1076
///
0 commit comments