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`).
This commit is contained in:
parent
4f1f764548
commit
8eb56e6988
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user