-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 9 pull requests #25888
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
Rollup of 9 pull requests #25888
Conversation
steveklabnik
commented
May 29, 2015
- Successful merges: Add a missing space to the Glossary page of TRPL #25788, Improve mem::forget documentation #25861, removed lonely closing parenthesis #25864, Corrected typo #25865, Update style guide with latest commits from rust-guidelines #25866, Add 5 more error explanations. Update E0015's explanation. Add an error code. #25873, remove the last mentions of IoResult #25876, Add syntax for multiple lifetimes #25883, trpl: eight sections, not seven #25886
- Failed merges:
`core::cell::Cell<T>` and `core::cell::RefCell<T>` currently implement `PartialEq` when `T` does, and just defer to comparing `T` values. There is no reason the same shouldn’t apply to `Eq`. This enables `#[derive(Eq, PartialEq)]` on e.g. structs that have a `RefCell` field.
error::Error itself has downcasting methods, so there's no need to duplicate those here.
Ergonomics are a bit crappy right now because method resolution isn't smart enough to drop bounds, unfortunately.
This is now std::io::Result
…ichton This is now std::io::Result
Use a struct called Hole that keeps track of an invalid location in the vector and fills the hole on drop. I include a run-pass test that the current BinaryHeap fails, and the new one passes. Fixes rust-lang#25842
collections: Make BinaryHeap panic safe in sift_up / sift_down Use a struct called Hole that keeps track of an invalid location in the vector and fills the hole on drop. I include a run-pass test that the current BinaryHeap fails, and the new one passes. NOTE: The BinaryHeap will still be inconsistent after a comparison fails. It will not have the heap property. What we fix is just that elements will be valid values. This is actually a performance win -- the new code does not bother to write in `zeroed()` values in the holes, it just leaves them as they were. Net result is something like a 5% decrease in runtime for `BinaryHeap::from_vec`. This can be further improved by using unchecked indexing (I confirmed it makes a difference, not a surprise with the non-sequential access going on), but let's leave that for another PR. Safety first 😉 Fixes rust-lang#25842
…::Ref ... and generalize the bounds on the value type.
There was no opening parenthesis for this closing parenthesis...
`core::cell::Cell<T>` and `core::cell::RefCell<T>` currently implement `PartialEq` when `T` does, and just defer to comparing `T` values. There is no reason the same shouldn’t apply to `Eq`. This enables `#[derive(Eq, PartialEq)]` on e.g. structs that have a `RefCell` field. r? @alexcrichton I’m unsure what to do with `#[stable]` attributes on `impl`s. `impl`s generated by `#[derive]` don’t have them.
"workd" corrected to "world"
A discussion at rust-lang#25832 established what the abbreviations mean.
The current version of hoedown treats lists interrupting paragraphs in the Markdown.pl style rather than CommonMark, so a newline is needed for the list to be rendered properly.
"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment."
Thanks to @cers who reported this in killercup/trpl-ebook#14! r? @steveklabnik
…lls, r=alexcrichton The previous feature gate assumed we would not define any (stable) const fns. But then @eddyb went and cleaned up the code. So this now extends the feature-gate to prohibit calls; but calls inside of macros are considered ok. r? @alexcrichton
…ossary, r=steveklabnik r? @steveklabnik
This adds an example from mem::swap, and provides some suggested uses of this function. This is my attempt to summarize the answers to a question I asked on reddit http://www.reddit.com/r/rust/comments/37jcul/what_is_forget_for/ and add the answers to the documentation so that no one else has to google or ask the question again.
There was no opening parenthesis for this closing parenthesis...
"workd" corrected to "world"
…abnik So that rust-guidelines can be deleted and src/doc/style can prosper as the official home of the rust guidelines. 😃
The E0397 explanation, as I've written it, isn't really an explanation, but I'm not sure what to put here. I will happily take suggestions. Partially addresses rust-lang#25851
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ p=1 force |
📌 Commit ed19a6e has been approved by |
@bors: force |
💔 Test failed - auto-linux-64-nopt-t |
@bors: retry force |
⚡ Previous build results for auto-mac-64-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-nopt-t, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt... |