about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-05-17 11:55:39 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-05-17 11:55:39 +0530
commit1fd0a8455b19cac75a9cb910a0315493f13d2ee9 (patch)
tree5b9fa66001fe4032e4cbada59a381470e4255904
parentb3706de65abda0f317fe6b2157e6ff4ee6346849 (diff)
parentba02739ad3519874cb19e741b3df59cef2917b9e (diff)
downloadrust-1fd0a8455b19cac75a9cb910a0315493f13d2ee9.tar.gz
rust-1fd0a8455b19cac75a9cb910a0315493f13d2ee9.zip
Rollup merge of #25506 - Wilfred:master, r=alexcrichton
Newcomers to Rust need to learn the distinctinion between `&str` and
`String`, so additonally having `string` in an example risks confusion.
-rw-r--r--src/doc/trpl/strings.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/trpl/strings.md b/src/doc/trpl/strings.md
index 61a6ec3eb3f..ece2c390be3 100644
--- a/src/doc/trpl/strings.md
+++ b/src/doc/trpl/strings.md
@@ -16,11 +16,11 @@ Rust has two main types of strings: `&str` and `String`. Let’s talk about
 `&'static str`:
 
 ```rust
-let string = "Hello there."; // string: &'static str
+let greeting = "Hello there."; // greeting: &'static str
 ```
 
 This string is statically allocated, meaning that it’s saved inside our
-compiled program, and exists for the entire duration it runs. The `string`
+compiled program, and exists for the entire duration it runs. The `greeting`
 binding is a reference to this statically allocated string. String slices
 have a fixed size, and cannot be mutated.