Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for meta variable expressions #1485

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

c410-f3r
Copy link
Contributor

Requested in rust-lang/rust#122808

@@ -195,6 +195,220 @@ compiler knows how to expand them properly:
not have the same number. This requirement applies to every layer of nested
repetitions.

## Meta variable expressions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Meta variable" should be "metavariable" for consistency with everything else. Ditto for all other appearances of the phrase.

@@ -195,6 +195,220 @@ compiler knows how to expand them properly:
not have the same number. This requirement applies to every layer of nested
repetitions.

## Meta variable expressions

Give access to additional metadata about meta variables that otherwise would be difficult or even impossible to get through elements such as `count` or `index`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elements such as count or index.

The wording implies that count and index are "elements" through which it would be difficult or impossible to get metadata, but presumably that's not the intention.

}
```

### length(depth)
Copy link

@jdahlstrom jdahlstrom Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding, but should consider changing the name to "len". Length is abbreviated to "len" everywhere in std; there is only a single, unstable, API that uses "length".

Copy link

@tgross35 tgross35 Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdahlstrom you may want to bring that up on the implementation PR, currently under FCP proposal rust-lang/rust#122808

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgross35 Indeed, done!

@ehuss ehuss added the S-waiting-on-stabilization Waiting for a stabilization PR to be merged in the main Rust repository label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-stabilization Waiting for a stabilization PR to be merged in the main Rust repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants