Repository navigation
Additional NonZero conversions - #129036
Conversation
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #129750) made this pull request unmergeable. Please resolve the merge conflicts. |
795df65 to
526396f
Compare
This comment has been minimized.
This comment has been minimized.
|
@clarfonthey since this is waiting on a review, do you still want this to be as a draft? or is this ready for review? |
|
It is ready for review; see the OP. I should just unmark it as draft and do what I said I was going to do, which is manually implement everything for all the I'll unmark as draft once I make those changes. |
|
☔ The latest upstream changes (presumably #138177) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@clarfonthey any updates on this? thanks |
526396f to
8c4d96e
Compare
This comment has been minimized.
This comment has been minimized.
ea6ddb9 to
aba3806
Compare
This comment has been minimized.
This comment has been minimized.
aba3806 to
089858a
Compare
|
@rustbot ready One of the implementations was not possible due to inference issues, and one of them has to be done via a macro due to coherence issues, but the rest are working as intended. |
| } | ||
| } | ||
|
|
||
| // FIXME: see library/std/tests/slice-from-array-issue-113238.rs |
There was a problem hiding this comment.
Did you want to leave in the whole commented out block?
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Additional NonZero conversions
|
@bors r+ |
…=nia-e Additional NonZero conversions ACP: rust-lang/libs-team#145 Requires FCP due to insta-stable APIs added: ```rust // can't be done generically; compiler can't infer that ZeroablePrimitive is sealed for coherence reasons impl From<&NonZero<uN>> for &uN; impl From<&NonZero<iN>> for &iN; impl From<&NonZero<usize>> for &usize; impl From<&NonZero<isize>> for &isize; impl From<&NonZero<char>> for &char; // excluded due to typechecking bug, but left commented out in code // impl<T> From<&[NonZero<T>]> for &[T] where T: ZeroablePrimitive; // rest are generic impl<T, const N: usize> From<[NonZero<T>; N]> for [T; N] where T: ZeroablePrimitive; impl<T> TryFrom<&T> for &NonZero<T> where T: ZeroablePrimitive; impl<T> TryFrom<&[T]> for &[NonZero<T>] where T: ZeroablePrimitive; impl<T, const N: usize> TryFrom<[T; N]> for [NonZero<T>; N] where T: ZeroablePrimitive; ``` Note that the `Error` for the `TryFrom` implementations is `TryFromIntError` to match the similar impls. r? rust-lang/libs-api
…=nia-e Additional NonZero conversions ACP: rust-lang/libs-team#145 Requires FCP due to insta-stable APIs added: ```rust // can't be done generically; compiler can't infer that ZeroablePrimitive is sealed for coherence reasons impl From<&NonZero<uN>> for &uN; impl From<&NonZero<iN>> for &iN; impl From<&NonZero<usize>> for &usize; impl From<&NonZero<isize>> for &isize; impl From<&NonZero<char>> for &char; // excluded due to typechecking bug, but left commented out in code // impl<T> From<&[NonZero<T>]> for &[T] where T: ZeroablePrimitive; // rest are generic impl<T, const N: usize> From<[NonZero<T>; N]> for [T; N] where T: ZeroablePrimitive; impl<T> TryFrom<&T> for &NonZero<T> where T: ZeroablePrimitive; impl<T> TryFrom<&[T]> for &[NonZero<T>] where T: ZeroablePrimitive; impl<T, const N: usize> TryFrom<[T; N]> for [NonZero<T>; N] where T: ZeroablePrimitive; ``` Note that the `Error` for the `TryFrom` implementations is `TryFromIntError` to match the similar impls. r? rust-lang/libs-api
…uwer Rollup of 15 pull requests Successful merges: - #158936 (Add `std::fs::{Home|Media}Dirs`) - #129036 (Additional NonZero conversions) - #158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata) - #161015 (Stabilize `funnel_shifts` (including `const`)) - #161712 (Stabilize `Result::into_{ok,err}`) - #162493 (Add support for -Zsanitizer-cfi-minimal-runtime) - #162655 (next solver: prefer to select impl candidates over global where-clause candidates) - #162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment) - #163200 (make `RustaceansAreAwesome` satisfy trait bounds) - #163331 (Move `Arc` and `Rc` into `rcs` mod) - #163427 (implement #![feature(gca_adts)]) - #163428 (do not complain about unstable target features on nightly) - #163444 (Add `stable_rustc` helper in `run-make-support`) - #163447 (Allow using different index types when reading and writing to tables) - #163450 (Force the correct type variable to never for method resolution on an adjusted never type)
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing c1070d6 (parent) -> 5d89371 (this PR) Test differencesShow 2236 test diffs2236 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 5d8937173e7c40406c167f4e94737da8925333ad --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (5d89371): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.6%, secondary 4.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.4%, secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 487.231s -> 489.535s (0.47%) |
View all comments
ACP: rust-lang/libs-team#145
Requires FCP due to insta-stable APIs added:
Note that the
Errorfor theTryFromimplementations isTryFromIntErrorto match the similar impls.r? rust-lang/libs-api