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

document constant expressions in rust.md reference manual #5551

Closed
pnkfelix opened this issue Mar 26, 2013 · 12 comments
Closed

document constant expressions in rust.md reference manual #5551

pnkfelix opened this issue Mar 26, 2013 · 12 comments
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools I-needs-decision Issue: In need of a decision. metabug Issues about issues themselves ("bugs about bugs") P-low Low priority

Comments

@pnkfelix
Copy link
Member

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.

@pnkfelix
Copy link
Member Author

For example, should constant expressions include the production
const-expr ::= (const-expr as type)
as desired by issue #4063

@catamorphism
Copy link
Contributor

Visiting for triage. Still important.

@pnkfelix
Copy link
Member Author

pnkfelix commented 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
Copy link
Contributor

@brson
Copy link
Contributor

brson commented Apr 8, 2014

Nominating for removal from milestone.

@pnkfelix
Copy link
Member Author

pnkfelix commented Apr 9, 2014

@brson you think we can release 1.0 without a formal definition for the constant expression sublanguage?

@pnkfelix
Copy link
Member Author

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 pnkfelix removed this from the 1.0 milestone Apr 10, 2014
@brson brson removed the I-nominated label Apr 10, 2014
@steveklabnik
Copy link
Member

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
Copy link
Contributor

@steveklabnik I'm not sure I agree with this assessment. I guess it depends on what level of precision we are shooting for.

@steveklabnik steveklabnik reopened this Feb 27, 2015
@steveklabnik
Copy link
Member

Okay, fill me in :)

@steveklabnik
Copy link
Member

Triage: have had several conversations about this, never quite been sure exactly what we want to put and where.

@brson brson added P-low Low priority I-needs-decision Issue: In need of a decision. and removed P-medium Medium priority labels Oct 20, 2016
@steveklabnik steveklabnik added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Mar 10, 2017
@steveklabnik
Copy link
Member

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...

flip1995 pushed a commit to flip1995/rust that referenced this issue May 5, 2020
…ge, r=phansch,flip1995

Fix match on vec items: match on vec[..]

- Added new tests
- Fixed false positive when matching on full range, which will never panic

Closes rust-lang#5551
changelog: fix match_on_vec_items when matching full range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools I-needs-decision Issue: In need of a decision. metabug Issues about issues themselves ("bugs about bugs") P-low Low priority
Projects
None yet
Development

No branches or pull requests

6 participants