Skip to content

Commit

Permalink
Ch. 10: clarify note about compiler errors and 'static
Browse files Browse the repository at this point in the history
- Merge in `main` and resolve merge conflicts.
- Integrate both branches’ suggestions, then rephrase to stay closer to
  the original output.
  • Loading branch information
chriskrycho committed Dec 16, 2024
3 parents cd3b1c0 + 63825d5 + 01f0b1b commit 80d6bbe
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 80d6bbe

Please sign in to comment.