Skip to content

Commit

Permalink
add missing 'static lifetime in docs
Browse files Browse the repository at this point in the history
The example refers to a static lifetime parameter that can be elided.
This parameter is not included, meaning lifetime elision is not shown.
  • Loading branch information
mulimoen committed Nov 16, 2019
1 parent 1d8b6ce commit e85f40c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e85f40c

Please sign in to comment.