Skip to content

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

Closed
sstangl wants to merge 1 commit into
rust-lang:masterfrom
sstangl:master
Closed

sstangl wants to merge 1 commit into
rust-lang:masterfrom
sstangl:master

Conversation

@sstangl

@sstangl sstangl commented Jan 27, 2011

Copy link
Copy Markdown
Contributor

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

graydon commented Jan 27, 2011

Copy link
Copy Markdown
Contributor

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

graydon commented Jan 27, 2011

Copy link
Copy Markdown
Contributor

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
gi-dellav pushed a commit to gi-dellav/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 pushed 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 <cmzech@amazon.com>
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
208: grammar: fix where clause parsing r=matklad a=matklad

closes rust-lang#205

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
malezjaa pushed a commit to malezjaa/rust that referenced this pull request Nov 14, 2026
Remove the need for unwrap when using ProbeSeq

Changes the order of operation here a bit so that the code only moves to the next position if it is actually necessary which could be faster, or at least makes for less work for LLVM.
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