Rollup merge of #40194 - letmaik:patch-1, r=steveklabnik
Fix wrong word used in book page "const and static"
This commit is contained in:
@@ -32,7 +32,7 @@ static N: i32 = 5;
|
|||||||
Unlike [`let`][let] bindings, you must annotate the type of a `static`.
|
Unlike [`let`][let] bindings, you must annotate the type of a `static`.
|
||||||
|
|
||||||
Statics live for the entire lifetime of a program, and therefore any
|
Statics live for the entire lifetime of a program, and therefore any
|
||||||
reference stored in a constant has a [`'static` lifetime][lifetimes]:
|
reference stored in a static has a [`'static` lifetime][lifetimes]:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
static NAME: &'static str = "Steve";
|
static NAME: &'static str = "Steve";
|
||||||
|
|||||||
Reference in New Issue
Block a user