3 ms·
Like this: 'a: { let a_var: u32 = 42; let a_ref: &'a u32 = &a_var; } // ^^^^^ only valid in 'a: {}
by coolreader18 8y ago
Like this:
'a: {
let a_var: u32 = 42;
let a_ref: &'a u32 = &a_var;
} // ^^^^^ only valid in 'a: {}
- gpm 8y agoThat doesn't compile with "use of undeclared lifetime name `'a`"
- steveklabnik 8y agoYou can name loop labels like this, but you cannot use them to introduce actual lifetimes, that’s right.