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.
This commit is contained in:
parent
1d8b6ce89e
commit
e85f40cbd2
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue