-
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
Rollup of 10 pull requests #39030
Merged
Merged
Rollup of 10 pull requests #39030
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rather than improving the check, let's ditch emutls.c entirely.
We should teach conversion from `str` to `String` using `to_string` rather than the legacy `to_owned`.
Clarify Extend behaviour wrt existing keys This seems to be consistent with all the Extend implementations I found, and isn't documented anywhere else afaik.
libcompiler_builtins: Don't build emutls.c Rather than improving the check, let's ditch emutls.c entirely.
Add missing links and examples for path modules and structs r? @frewsxcv
Add missing doc examples for Mutex r? @frewsxcv
std/net/udp: Improve set_nonblocking test While writing a separate change, I noticed the current test for `UdpSocket::set_nonblocking()` is fairly ineffective. This fixes the test so that it validates that a correct error is returned on calls to `recv()` when no data is available.
Fix some typos in Nomicon I waited a bit before creating this PR in case I find more typos – I didn't. I've read `CONTRIBUTING.md` but didn't `make check`, and `make doc` takes incredibly long. (Among other things, `make doc` builds llvm from scratch. Not sure if that's intentional.)
Fix docs for min/max algorithms I thought at first "what did they think about when stabilizing this!?", but it turned out it's just wrong docs. Phew. r? @steveklabnik Test: ``` use std::cmp::Ordering; struct S(u8, u8); impl PartialEq for S { fn eq(&self, other: &Self) -> bool { self.0 == other.0 } } impl PartialOrd for S { fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.0.cmp(&other.0)) } } impl Ord for S { fn cmp(&self, other: &Self) -> Ordering { self.0.cmp(&other.0) } } fn main() { let arr = [S(0, 1), S(0, 2)]; println!("min {:?}", arr.iter().min()); println!("min_by {:?}", arr.iter().min_by(|x, y| x.0.cmp(&y.0))); println!("min_by_key {:?}", arr.iter().min_by_key(|x| x.0)); println!("max {:?}", arr.iter().max()); println!("max_by {:?}", arr.iter().max_by(|x, y| x.0.cmp(&y.0))); println!("max_by_key {:?}", arr.iter().max_by_key(|x| x.0)); } ``` Output: ``` rustc 1.15.0-beta.3 (a035041 2017-01-07) min Some(S(0, 1)) min_by Some(S(0, 1)) min_by_key Some(S(0, 1)) max Some(S(0, 2)) max_by Some(S(0, 2)) max_by_key Some(S(0, 2)) ```
…abnik Change `to_owned` to `to_string` in docs We should teach conversion from `str` to `String` using `to_string` rather than the legacy `to_owned`.
[libcollections] [doc] Fix typo in documentation Replace two instances of `an raw` with `a raw` in documentation blocks.
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ p=1 |
📌 Commit a861eb0 has been approved by |
⌛ Testing commit a861eb0 with merge bbf0735... |
💔 Test failed - status-travis |
@bors: retry |
☀️ Test successful - status-appveyor, status-travis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
to_owned
toto_string
in docs #39024, [libcollections] [doc] Fix typo in documentation #39027