Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you have an example of what you mean?


Like this:

  'a: {
      let a_var: u32 = 42;
      let a_ref: &'a u32 = &a_var;
  } //    ^^^^^ only valid in 'a: {}


That doesn't compile with "use of undeclared lifetime name `'a`"


You can name loop labels like this, but you cannot use them to introduce actual lifetimes, that’s right.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: