Skip to content

Commit e85f40c

Browse files
committed
add missing 'static lifetime in docs
The example refers to a static lifetime parameter that can be elided. This parameter is not included, meaning lifetime elision is not shown.
1 parent 1d8b6ce commit e85f40c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/libstd/keyword_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ mod break_keyword { }
126126
/// look like this:
127127
///
128128
/// ```rust
129-
/// const WORDS: &str = "hello rust!";
129+
/// const WORDS: &'static str = "hello rust!";
130130
/// ```
131131
///
132132
/// Thanks to static lifetime elision, you usually don't have to explicitly use 'static:

0 commit comments

Comments
 (0)