-
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 #47445
Rollup of 10 pull requests #47445
Conversation
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.
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ p=11 |
📌 Commit 81a60a7 has been approved by |
⌛ Testing commit 81a60a796ed2184eb61bb347229ce2a939912844 with merge 36736ad4b0087404a7488644bafaaee3cad03fd1... |
💔 Test failed - status-travis |
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.
fix off-by-one error Fixes rust-lang#47325.
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. 😈
📌 Commit fa008c0 has been approved by |
☀️ Test successful - status-appveyor, status-travis |
f32::log
andf64::log
are not correctly rounded #47277, fix off-by-one error #47330, Add NLL tests for #46557 and #38899 #47368, Avoid panicking when invalid argument is passed to cfg(..) #47372, Enforce dashes in the unstable book file names #47414, Move "no asm" check into AST validation #47417, Make ui-fulldeps/update-references executable #47432, Remove leftover Rand stuff #47443