Skip to content

Conversation

shahn and others added 21 commits December 27, 2016 14:28
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
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.
@rust-highfive
Copy link
Contributor

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=1

@bors
Copy link
Collaborator

bors commented Jan 13, 2017

📌 Commit a861eb0 has been approved by GuillaumeGomez

@bors
Copy link
Collaborator

bors commented Jan 13, 2017

⌛ Testing commit a861eb0 with merge bbf0735...

@bors
Copy link
Collaborator

bors commented Jan 13, 2017

💔 Test failed - status-travis

@GuillaumeGomez
Copy link
Member Author

@bors: retry

@bors
Copy link
Collaborator

bors commented Jan 13, 2017

⌛ Testing commit a861eb0 with merge 7789881...

bors added a commit that referenced this pull request Jan 13, 2017
Rollup of 10 pull requests

- Successful merges: #38362, #38636, #38877, #38946, #38965, #38986, #38994, #38995, #39024, #39027
- Failed merges:
@bors
Copy link
Collaborator

bors commented Jan 14, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: GuillaumeGomez
Pushing 7789881 to master...

@bors bors merged commit a861eb0 into rust-lang:master Jan 14, 2017
@GuillaumeGomez GuillaumeGomez deleted the rollup branch January 14, 2017 11:10
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants