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

Rollup of 10 pull requests #47445

Merged
merged 32 commits into from
Jan 15, 2018
Merged

Rollup of 10 pull requests #47445

merged 32 commits into from
Jan 15, 2018

Conversation

tspiteri and others added 22 commits January 8, 2018 19:22
Closes rust-lang#47366

Adapt the sample code from the issues into mir-borrowck/nll test cases.
These guarantee that always the requested slice size will be returned
and any leftoever elements at the end will be ignored. It allows llvm to
get rid of bounds checks in the code using the iterator.

This is inspired by the same iterators provided by ndarray.

See rust-lang#47115
- Simplify nth() by making use of the fact that the slice is evenly
  divisible by the chunk size, and calling next() instead of
  duplicating it
- Call next_back() in last(), they are equivalent
- Implement ExactSizeIterator::is_empty()
…ter by the compiler

And also link from the normal chunks iterator to the exact_chunks one.
…t test

This way more useful information is printed if the test ever fails.
…_mut tests

Easy enough to do and ensures that the whole chunk is as expected
instead of just the element that was looked at before.
These are basically modified copies of the chunks/chunks_mut tests.
Also rename the existing underscore using files to use dashes.

Fixes rust-lang#47394.
When a ui-fulldeps comparison fails it suggests running
update-references.sh:

```
src/test/ui-fulldeps/update-references.sh 'rust/build/x86_64-apple-darwin/test/ui-fulldeps' 'resolve-error.rs'
```

This does not work as update-references.sh isn't executable. The other
update-references.sh in the ui directory is already executable so this looks
like an oversight.
@rust-highfive
Copy link
Collaborator

r? @cramertj

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

@kennytm
Copy link
Member Author

kennytm commented Jan 15, 2018

@bors r+ p=11

@bors
Copy link
Contributor

bors commented Jan 15, 2018

📌 Commit 81a60a7 has been approved by kennytm

@kennytm kennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 15, 2018
@bors
Copy link
Contributor

bors commented Jan 15, 2018

⌛ Testing commit 81a60a796ed2184eb61bb347229ce2a939912844 with merge 36736ad4b0087404a7488644bafaaee3cad03fd1...

@bors
Copy link
Contributor

bors commented Jan 15, 2018

💔 Test failed - status-travis

@kennytm kennytm changed the title Rollup of 11 pull requests Rollup of 10 pull requests Jan 15, 2018
Better Debug impl for io::Error.

This PR includes the below changes:

1. The former impl wrapped the entire thing in `Error { repr: ... }` which was unhelpful; this has been removed.
2. The `Os` variant of `io::Error` included the code and message, but not the kind; this has been fixed.
3. The `Custom` variant of `io::Error` included a `Custom(Custom { ... })`, which is now just `Custom { ... }`.

Example of previous impl:

```rust
Error {
    repr: Custom(
        Custom {
            kind: InvalidData,
            error: Error {
                repr: Os {
                    code: 2,
                    message: "no such file or directory"
                }
            }
        }
    )
}
```

Example of new impl:

```rust
Custom {
    kind: InvalidData,
    error: Os {
        code: 2,
        kind: NotFound,
        message: "no such file or directory"
    }
}
```
Add slice::ExactChunks and ::ExactChunksMut iterators

These guarantee that always the requested slice size will be returned
and any leftoever elements at the end will be ignored. It allows llvm to
get rid of bounds checks in the code using the iterator.

This is inspired by the same iterators provided by ndarray.

Fixes rust-lang#47115

I'll add unit tests for all this if the general idea and behaviour makes sense for everybody.
Also see rust-lang#47115 (comment) for an example what this improves.
doc: show that `f32::log` and `f64::log` are not correctly rounded

Fixes rust-lang#47273.

One thing I'm not sure about is whether the "calculated as `self.ln() / base.ln()`" bit is being too specific, maybe we do not want to make this such a strong commitment. I think it's fine, but we should not make commitments in the API documentation by accident.

In case that is removed, the added sentence "`self.log2()` can ... base 10." still makes it amply clear that the `log` methods can be more inaccurate than other methods. If the above clause is removed, this second sentence can be moved to the first paragraph, kind of like the accuracy comment for the [`mul_add`](https://doc.rust-lang.org/std/primitive.f32.html#method.mul_add) method.
Add NLL tests for rust-lang#46557 and rust-lang#38899

This adapts the sample code from the two issues into test code.

Closes rust-lang#46557
Closes rust-lang#38899

r? @nikomatsakis
…hton

Avoid panicking when invalid argument is passed to cfg(..)

Closes rust-lang#43925.
Closes rust-lang#43926.
Enforce dashes in the unstable book file names

Also rename the existing underscore using files to use dashes.

Fixes rust-lang#47394.
Move "no asm" check into AST validation
…nces-exec, r=petrochenkov

Make ui-fulldeps/update-references executable

When a ui-fulldeps comparison fails it suggests running update-references.sh:

```
src/test/ui-fulldeps/update-references.sh 'rust/build/x86_64-apple-darwin/test/ui-fulldeps' 'resolve-error.rs'
```

This does not work as update-references.sh isn't executable. The other update-references.sh in the ui directory is already executable so this looks like an oversight.
Remove leftover Rand stuff

The in-tree version of `rand` was removed in 6bc8f16, but for some reason this lone file avoided the purge. Figured it's about time to finish the job. 😈
@kennytm
Copy link
Member Author

kennytm commented Jan 15, 2018

@bors r+

Removed #47334

@bors
Copy link
Contributor

bors commented Jan 15, 2018

📌 Commit fa008c0 has been approved by kennytm

@bors
Copy link
Contributor

bors commented Jan 15, 2018

⌛ Testing commit fa008c0 with merge 57850e5...

bors added a commit that referenced this pull request Jan 15, 2018
Rollup of 10 pull requests

- Successful merges: #47120, #47126, #47277, #47330, #47368, #47372, #47414, #47417, #47432, #47443
- Failed merges: #47334
@bors
Copy link
Contributor

bors commented Jan 15, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing 57850e5 to master...

@bors bors merged commit fa008c0 into rust-lang:master Jan 15, 2018
@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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.