8000 Split const generics in two and document inferred consts by BoxyUwU · Pull Request #1835 · rust-lang/reference · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Split const generics in two and document inferred consts #1835

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BoxyUwU
Copy link
Member
@BoxyUwU BoxyUwU commented May 26, 2025

I split some stuff out of the "const parameters" chapter because it seemed weird to talk about types in a different place from consts like we were previously. This PR assumes that feature(generic_arg_infer) has been stabilized and so documents _ arguments to const parameters, so should not be merged until then.

I don't really know how these r[...] annotations are supposed to work. Hope I didn't mess anything up there

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label May 26, 2025
@ehuss ehuss added the S-waiting-on-stabilization Waiting for a stabilization PR to be merged in the main Rust repository label May 26, 2025
```

r[const-generics.concrete-expr]
## Concrete expressions
Copy link
Member Author

Choose a reason for hiding this comment

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

Something I left out here is that the "concrete expressions" are not required to be quite so concrete for repeat expr counts as a backwards compatibility FCW. Does the reference intend to document the actual state of the compiler, or can I take liberties in documenting things as if FCWs are already hard errors?

@traviscross
Copy link
Contributor

@ehuss and I are reviewing this on a call. This is a bit tough to review in that the content was both moved and changed in one commit. If possible, it'd be helpful to us if this could be broken out into (at least) two commits; one to move the content, then the other or others to make the changes and additions.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: The marked PR is awaiting review from a maintainer labels May 27, 2025
@BoxyUwU BoxyUwU force-pushed the const-generics-stuff branch from da274a2 to 48cfb78 Compare May 27, 2025 22:46
@BoxyUwU
Copy link
Member Author
BoxyUwU commented May 27, 2025

Sure, done

@BoxyUwU
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: The marked PR is awaiting review from a maintainer and removed S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. labels May 27, 2025

r[const-generics.inferred.syntax]
```grammar,types
@root InferredConst -> `_`
Copy link
Member Author
@BoxyUwU BoxyUwU May 27, 2025

Choose a reason for hiding this comment

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

I don't really know how to use this grammar,types syntax to explain that you can do (((_))) too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer 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.

4 participants
0