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

More small syntax changes in reference.md #24760

Closed
wants to merge 1 commit into from

Conversation

rozbb
Copy link

@rozbb rozbb commented Apr 24, 2015

Fixes were either for style, to remove "deprecated" warnings, or to get the code to compile at all.

@rust-highfive
Copy link
Collaborator

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 {
Copy link
Member

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

Copy link
Author

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.

Copy link
Member

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.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Apr 24, 2015

📌 Commit 8f43714 has been approved by steveklabnik

@steveklabnik
Copy link
Member

Thank you!

@bors
Copy link
Contributor

bors commented Apr 24, 2015

☔ The latest upstream changes (presumably #24744) made this pull request unmergeable. Please resolve the merge conflicts.

This was referenced Apr 24, 2015
@steveklabnik
Copy link
Member

I manually put this in #24786

@rozbb
Copy link
Author

rozbb commented Apr 25, 2015

Awesome, thanks!

@steveklabnik
Copy link
Member

manually roled into #24798

bors added a commit that referenced this pull request Apr 25, 2015
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.

5 participants