You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
document constant expressions in rust.md reference manual #5551
The section on "static items" (formerly entitled "constants") refers to some class of "constant expressions", but we have not defined what these are.
(I think catamorphism has noted this via comments in a few issues I have seen, but I have not seen an actual Issue for this topic; so I am promoting it to a full fledged issue.)
In particular, if we need a subgrammar, or some other sort of static analysis to classify the constant expressions correctly, then we should document it.
Another question, should constant expressions include the production
const-expr ::= const-expr . id
for field access on static constant struct values? (We currently explicitly fail to const-eval such expressions; but it seems like a potentially desirable feature; see e.g. #9762)
Activity
pnkfelix commentedon May 23, 2013
For example, should constant expressions include the production
const-expr ::= (const-expr
astype)as desired by issue #4063
catamorphism commentedon Jul 15, 2013
Visiting for triage. Still important.
pnkfelix commentedon Oct 8, 2013
Another question, should constant expressions include the production
const-expr ::= const-expr . id
for field access on static constant struct values? (We currently explicitly fail to const-eval such expressions; but it seems like a potentially desirable feature; see e.g. #9762)
nikomatsakis commentedon Oct 28, 2013
I just want to point to this comment of mine which describes some of the impl challenges for intertwining const expr evaluation and type checking
brson commentedon Apr 8, 2014
Nominating for removal from milestone.
pnkfelix commentedon Apr 9, 2014
@brson you think we can release 1.0 without a formal definition for the constant expression sublanguage?
pnkfelix commentedon Apr 10, 2014
Okay, we can live with shipping 1.0 without this, though it would be really good to have something nailed-down (and documented).
Taking off the 1.0 milestone, but leaving as P-high to reflect its importance.
steveklabnik commentedon Feb 13, 2015
We now do not refer to 'constant expressions' in the reference at all, and the section on statics seems fine to me. Giving this a close.
nikomatsakis commentedon Feb 27, 2015
@steveklabnik I'm not sure I agree with this assessment. I guess it depends on what level of precision we are shooting for.
steveklabnik commentedon Feb 27, 2015
Okay, fill me in :)
steveklabnik commentedon Mar 4, 2016
Triage: have had several conversations about this, never quite been sure exactly what we want to put and where.
steveklabnik commentedon Mar 23, 2017
The reference is now in its own repo, so I have migrated this issue: rust-lang/reference#18
Side note: wow, a four digit issue ID. An endangered species at this point...
Auto merge of rust-lang#5560 - CrazyRoka:fix-match-on-vector-full-ran…
Merge rust-lang#6133