diff options
| author | Jonathan Price <jonmarkprice@users.noreply.github.com> | 2016-06-28 11:39:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-28 11:39:24 -0500 |
| commit | 8eb56e698814c5a626b9c935162ff8487bca0774 (patch) | |
| tree | cfcda8a26a2582dea872c4dc8a9fb796ebe5cd27 | |
| parent | 4f1f764548d8ca1b851c18b9ea4e63b2f72aebaa (diff) | |
| download | rust-8eb56e698814c5a626b9c935162ff8487bca0774.tar.gz rust-8eb56e698814c5a626b9c935162ff8487bca0774.zip | |
took comment out of code block
no reason for a long comment in a code block when we could take it out, especially since it looks like it's using markdown (`struct`, `&` and `lvl`).
| -rw-r--r-- | src/doc/book/lifetimes.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/doc/book/lifetimes.md b/src/doc/book/lifetimes.md index 3d18e7cd0eb..f7d9c94bc45 100644 --- a/src/doc/book/lifetimes.md +++ b/src/doc/book/lifetimes.md @@ -335,11 +335,13 @@ fn print<'a>(s: &'a str); // expanded fn debug(lvl: u32, s: &str); // elided fn debug<'a>(lvl: u32, s: &'a str); // expanded +``` -// In the preceding example, `lvl` doesn’t need a lifetime because it’s not a -// reference (`&`). Only things relating to references (such as a `struct` -// which contains a reference) need lifetimes. +In the preceding example, `lvl` doesn’t need a lifetime because it’s not a +reference (`&`). Only things relating to references (such as a `struct` +which contains a reference) need lifetimes. +```rust,ignore fn substr(s: &str, until: u32) -> &str; // elided fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded |
