rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
94.87k stars 12.23k forks source link

Raw syntax for lifetimes and loop labels #126335

Open traviscross opened 3 weeks ago

traviscross commented 3 weeks ago

We don't currently accept:

pub fn label() {
    'r#async: loop {
        break 'r#async;
    }
}

pub fn lifetime<'r#async>() {}

Should we? This has relevance to edition migrations.

See:

traviscross commented 3 weeks ago

@rustbot labels -I-lang-nominated

We discussed this in the lang triage call today. Our consensus was that this should be allowed and that it seems to have been an oversight that it wasn't already, given RFC 3101 and other related work.

compiler-errors commented 3 weeks ago

I'll put up a PR for this tomorrow. I've got a draft, just want to make sure it's actually correct.