Add experimental fallible::FallibleVec - #157394
ChrisDenton wants to merge 1 commit into
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Ooph, that's unfortunate. Simplest thing is to rename this type. But I do wonder if that could be fixed. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fallible::Vecfallible::FallibleVec
|
Let me know if this is actually waiting on a review -- for now since CI is failing I'll move it back to waiting on author. |
b0e0675 to
39ac2e9
Compare
|
Any special-casing of Miri in the standard library requires review. cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
39ac2e9 to
30086ce
Compare
This comment has been minimized.
This comment has been minimized.
b98f62a to
ed80ad2
Compare
This comment has been minimized.
This comment has been minimized.
ed80ad2 to
12f773c
Compare
This comment has been minimized.
This comment has been minimized.
12f773c to
93c0c8d
Compare
This comment has been minimized.
This comment has been minimized.
93c0c8d to
ec3627b
Compare
|
@Mark-Simulacrum sorry about the wait, I have more time to move this forward now. As a reminder to myself as much as you the naming "FallibleVec" is pretty much like "yeet", it's probably not what we end up with but it can act as a placeholder until we figure out that particular bikeshed. Also diagnostics need some work, but I'm told this isn't trivial so I'd rather that not be a blocker atm. As noted in the OP, this is intended to be a MVP. It's likely everything about this API will be argued over but I think we should start with something rather than wait until we've fully designed everything. @rustbot ready |
ec3627b to
1801eb3
Compare
|
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. |
|
I removed the Allocator API stuff. When I originally made this PR it had been more or less unchanged for ages but now it's had a lot of work done and is nearing stabilization so I want to avoid stepping on any toes. It's easy to add back the Allocator methods in a follow up PR once Allocator is properly stable and things have settled a bit. |
This comment has been minimized.
This comment has been minimized.
1801eb3 to
4d4aad0
Compare
Tracking issue: #157392
There are a few things to be aware of here:
VecVecis a pretty crucial part of rust's standard library. We have to be extremely careful touching its code. We might regress performance or make debugging worse.With that in mind, this PR does the minimum necessary for an MVP
fallible::FallibleVec. The only actually new thing it adds is falliblepushandpush_mutmethods. The rest just forwards toVecequivalents. Further APIs can be added (carefully) afterwards.I apologise for the number of lines changed in the PR but they are mostly copy/pasted docs (I wanted them for the testable examples mostly). We should probably find a better way of duplicating them but I think this works for a minimally intrusive experiment.