Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign updocument constant expressions in rust.md reference manual #5551
Comments
graydon
referenced this issue
May 2, 2013
Closed
Coercing bare fn to `&fn` is inconsistent in statics. #5216
This comment has been minimized.
This comment has been minimized.
|
For example, should constant expressions include the production |
This comment has been minimized.
This comment has been minimized.
|
Visiting for triage. Still important. |
brson
referenced this issue
Aug 1, 2013
Closed
inferred literals and integer-const expressions aren't overflow checked #4220
This was referenced Aug 8, 2013
pnkfelix
referenced this issue
Aug 29, 2013
Closed
enum variants aren't considered to be const #5873
pnkfelix
referenced this issue
Sep 9, 2013
Closed
RFC: Consider turning `as` into a user-implementable Cast trait #7080
This comment has been minimized.
This comment has been minimized.
|
Another question, should constant expressions include the production |
This comment has been minimized.
This comment has been minimized.
pnkfelix
referenced this issue
Oct 28, 2013
Closed
ty_fixed_length_vec's length const-expr not eval'ed consistently (vs other const-exprs) #10122
This comment has been minimized.
This comment has been minimized.
|
Nominating for removal from milestone. |
brson
added
the
I-nominated
label
Apr 8, 2014
This comment has been minimized.
This comment has been minimized.
|
@brson you think we can release 1.0 without a formal definition for the constant expression sublanguage? |
This comment has been minimized.
This comment has been minimized.
|
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. |
pnkfelix
removed this from the 1.0 milestone
Apr 10, 2014
brson
removed
the
I-nominated
label
Apr 10, 2014
thestinger
removed
the
I-completion
label
Sep 16, 2014
This comment has been minimized.
This comment has been minimized.
|
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. |
steveklabnik
closed this
Feb 13, 2015
This comment has been minimized.
This comment has been minimized.
|
@steveklabnik I'm not sure I agree with this assessment. I guess it depends on what level of precision we are shooting for. |
steveklabnik
reopened this
Feb 27, 2015
This comment has been minimized.
This comment has been minimized.
|
Okay, fill me in :) |
This comment has been minimized.
This comment has been minimized.
|
Triage: have had several conversations about this, never quite been sure exactly what we want to put and where. |
brson
added
P-low
I-needs-decision
and removed
P-medium
labels
Oct 20, 2016
steveklabnik
added
the
T-doc
label
Mar 10, 2017
This comment has been minimized.
This comment has been minimized.
|
The reference is now in its own repo, so I have migrated this issue: rust-lang-nursery/reference#18 Side note: wow, a four digit issue ID. An endangered species at this point... |
pnkfelix commentedMar 26, 2013
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.