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 8 pull requests #47435

Closed
wants to merge 27 commits into from
Closed

Conversation

tspiteri and others added 27 commits January 8, 2018 19:22
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.
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.
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.
…=QuietMisdreavus

Switch to pulldown as default markdown renderer

r? @QuietMisdreavus
… r=estebank

Add error code for unstable feature errors

Fixes rust-lang#47397.
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.
@rust-highfive
Copy link
Collaborator

r? @joshtriplett

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

@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=10

@bors
Copy link
Contributor

bors commented Jan 14, 2018

📌 Commit 4ad6ccf has been approved by GuillaumeGomez

@bors
Copy link
Contributor

bors commented Jan 15, 2018

⌛ Testing commit 4ad6ccf with merge 9e05654ce35dcf836e99e343735c993d4160e3d4...

@bors
Copy link
Contributor

bors commented Jan 15, 2018

💔 Test failed - status-travis

@kennytm kennytm closed this Jan 15, 2018
@GuillaumeGomez GuillaumeGomez deleted the rollup branch January 15, 2018 09:18
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 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.