Skip to content

Commit

Permalink
Merge pull request #4164 from rust-lang/ch10-03-static-error-messages
Browse files Browse the repository at this point in the history
Ch. 10: clarify note about compiler errors and `'static`
  • Loading branch information
chriskrycho authored Dec 16, 2024
2 parents cd3b1c0 + 80d6bbe commit ad2011d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch10-03-lifetime-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ let s: &'static str = "I have a static lifetime.";
The text of this string is stored directly in the program’s binary, which is
always available. Therefore, the lifetime of all string literals is `'static`.

You might see suggestions to use the `'static` lifetime in error messages. But
You might see suggestions in error messages to use the `'static` lifetime. But
before specifying `'static` as the lifetime for a reference, think about
whether the reference you have actually lives the entire lifetime of your
program or not, and whether you want it to. Most of the time, an error message
Expand Down

0 comments on commit ad2011d

Please sign in to comment.