-
Notifications
You must be signed in to change notification settings - Fork 533
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
base: master
Are you sure you want to change the base?
Conversation
``` | ||
|
||
r[const-generics.concrete-expr] | ||
## Concrete expressions |
There was a problem hiding this comment.
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?
@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 |
da274a2
to
48cfb78
Compare
Sure, done |
@rustbot ready |
|
||
r[const-generics.inferred.syntax] | ||
```grammar,types | ||
@root InferredConst -> `_` |
There was a problem hiding this comment.
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
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