Skip to content

Fix documentation: aliases may not be used in loop constructs. #208

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

Closed
wants to merge 1 commit into from
Closed

Conversation

sstangl
Copy link
Contributor

@sstangl sstangl commented Jan 27, 2011

The documentation states that "aliases can only be declared as arguments in a function or iterator signature, bound to the lifetime of a stack frame", but example code in Ref.Stmt.For and Ref.Stmt.Foreach use aliases within loop statements, which is contradictory. Rustboot validly rejects aliases in that position. This change removes the ambersand sigils to fix the examples.

@graydon
Copy link
Contributor

graydon commented Jan 27, 2011

Funny thing: while you're absolutely right that the document is inconsistent (and rustboot errs on the side of not allowing aliases), I have a hunch that they can be supported in those contexts, due to the way they're implemented. The edits you're making here are essentially covering over the tracks of some wishful thinking I've not yet managed to work out rules to handle.

I suppose for the sake of clarity I'll fold them in, and file a bug suggesting we figure out how to support aliases "someday".

@graydon
Copy link
Contributor

graydon commented Jan 27, 2011

Integrated.

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this pull request Dec 12, 2017
dlrobertson pushed a commit to dlrobertson/rust that referenced this pull request Nov 29, 2018
Enhance discussion of deprecated attribute
rchaser53 pushed a commit to rchaser53/rust that referenced this pull request Jan 19, 2019
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Oct 26, 2020
djtech-dev pushed a commit to djtech-dev/rust that referenced this pull request Dec 9, 2021
…inking

Add feature to disable linking to libffi
celinval added a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
Add tests for rust-lang#564, rust-lang#208 and rust-lang#87.

Unfortunately, it looks like there are still issues with with how we are
encoding panic threads and dynamic objects which are causing two of the
test cases to fail.
carolynzech added a commit to celinval/rust-dev that referenced this pull request Dec 13, 2024
Fixing some typos.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

Co-authored-by: Carolyn Zech <[email protected]>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants