-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
More small syntax changes in reference.md #24760
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
@@ -3163,7 +3163,7 @@ An example of a for loop over the contents of an array: | |||
|
|||
let v: &[Foo] = &[a, b, c]; | |||
|
|||
for e in v.iter() { | |||
for e in v { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this technically changes behavior, though I'm not sure it matters here. &v
would give you iter()
, just v
gives into_iter()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since v
is already a reference, it appears that the for loop is actually using v.iter()
. This code fails, but replacing it with v.iter()
works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, i missed that v was a slice! I clicked merge regardless.
@bors: r+ rollup |
📌 Commit 8f43714 has been approved by |
Thank you! |
☔ The latest upstream changes (presumably #24744) made this pull request unmergeable. Please resolve the merge conflicts. |
I manually put this in #24786 |
Awesome, thanks! |
manually roled into #24798 |
Fixes were either for style, to remove "deprecated" warnings, or to get the code to compile at all.