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
335335
336336fn debug(lvl: u32, s: &str); // elided
337337fn debug<'a>(lvl: u32, s: &'a str); // expanded
338+ ```
338339
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.
342343
344+ ``` rust,ignore
343345fn substr(s: &str, until: u32) -> &str; // elided
344346fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
345347
You can’t perform that action at this time.
0 commit comments