Skip to content

Commit

Permalink
Fix small nits
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Jun 28, 2020
1 parent dfd454b commit 4224313
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libstd/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,6 @@ mod self_upper_keyword {}

#[doc(keyword = "static")]
//
/// A place that is valid for the duration of a program.
///
/// A static item is a value which is valid for the entire duration of your
/// program (a `'static` lifetime).
///
Expand All @@ -1045,7 +1043,7 @@ mod self_upper_keyword {}
/// There are two types of `static` items: those declared in association with
/// the [`mut`] keyword and those without.
///
/// Items that are both static and owned cannot be moved:
/// Static items cannot be moved:
///
/// ```rust,compile_fail,E0507
/// static VEC: Vec<u32> = vec![];
Expand All @@ -1054,6 +1052,7 @@ mod self_upper_keyword {}
/// v
/// }
///
/// // This line causes an error
/// move_vec(VEC);
/// ```
///
Expand All @@ -1071,7 +1070,7 @@ mod self_upper_keyword {}
/// let r2 = &FOO as *const _;
/// // With a strictly read-only static, references will have the same adress
/// assert_eq!(r1, r2);
/// // A static item is used just like a variable
/// // A static item can be used just like a variable in many cases
/// println!("{:?}", FOO);
/// ```
///
Expand Down

0 comments on commit 4224313

Please sign in to comment.