File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -335,11 +335,13 @@ fn print<'a>(s: &'a str); // expanded
335
335
336
336
fn debug(lvl: u32, s: &str); // elided
337
337
fn debug<'a>(lvl: u32, s: &'a str); // expanded
338
+ ```
338
339
339
- // In the preceding example, `lvl` doesn’t need a lifetime because it’s not a
340
- // reference (`&`). Only things relating to references (such as a `struct`
341
- // which contains a reference) need lifetimes.
340
+ In the preceding example, ` lvl ` doesn’t need a lifetime because it’s not a
341
+ reference (` & ` ). Only things relating to references (such as a ` struct `
342
+ which contains a reference) need lifetimes.
342
343
344
+ ``` rust,ignore
343
345
fn substr(s: &str, until: u32) -> &str; // elided
344
346
fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
345
347
You can’t perform that action at this time.
0 commit comments