1
Fork 0

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:
Magnus Ulimoen 2019-11-16 08:22:40 +01:00
parent 1d8b6ce89e
commit e85f40cbd2

View 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: