We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b3706de + ba02739 commit 1fd0a84Copy full SHA for 1fd0a84
src/doc/trpl/strings.md
@@ -16,11 +16,11 @@ Rust has two main types of strings: `&str` and `String`. Let’s talk about
16
`&'static str`:
17
18
```rust
19
-let string = "Hello there."; // string: &'static str
+let greeting = "Hello there."; // greeting: &'static str
20
```
21
22
This string is statically allocated, meaning that it’s saved inside our
23
-compiled program, and exists for the entire duration it runs. The `string`
+compiled program, and exists for the entire duration it runs. The `greeting`
24
binding is a reference to this statically allocated string. String slices
25
have a fixed size, and cannot be mutated.
26
0 commit comments