]> git.lizzy.rs Git - rust.git/commitdiff
add missing 'static lifetime in docs
authorMagnus Ulimoen <flymagnus@gmail.com>
Sat, 16 Nov 2019 07:22:40 +0000 (08:22 +0100)
committerMagnus Ulimoen <flymagnus@gmail.com>
Sat, 16 Nov 2019 07:40:35 +0000 (08:40 +0100)
The example refers to a static lifetime parameter that can be elided.
This parameter is not included, meaning lifetime elision is not shown.

src/libstd/keyword_docs.rs

index d025a7d16f2562c17f656f6c2442e5233731e5b9..b0baf36308e44c26facb31c879300453cdecfe72 100644 (file)
@@ -126,7 +126,7 @@ mod break_keyword { }
 /// look like this:
 ///
 /// ```rust
-/// const WORDS: &str = "hello rust!";
+/// const WORDS: &'static str = "hello rust!";
 /// ```
 ///
 /// Thanks to static lifetime elision, you usually don't have to explicitly use 'static: