rust-lang / nomicon

The Dark Arts of Advanced and Unsafe Rust Programming
https://doc.rust-lang.org/nomicon/
Apache License 2.0
1.82k stars 263 forks source link

In Ownership/Lifetimes section, ` 'a: { ` should be a valid syntax #402

Closed Multirious closed 1 year ago

Multirious commented 1 year ago

At

// NOTE: 'a: { and &'b x is not valid syntax!

I believe that this should be a valid syntax with block labeling feature.

Multirious commented 1 year ago

This should be an easy fix. I could create a pull request now but just making sure. Please correct me if I'm wrong.

ehuss commented 1 year ago

I believe the comment is referring to the fact that it is not valid syntax for referring to a lifetime. We could extend the comment to say that ("…is not valid syntax. They are used here to illustrate the lifetime regions.") or something like that.

JohnTitor commented 1 year ago

Closing as wontfix, I assume @Multirious read the above as they added a reaction. Thank you for reporting anyway!