Uh oh!
There was an error while loading. Please reload this page.
New modifications - #155
Conversation
c2acd16 to
0865b42Comparejdm
commented
Jun 15, 2019
Could you please redo these changes so there's a separate commit for each of the points you mentioned? This is really difficult to review in its current condition. |
aa1a49c to
a797f80Comparec410-f3r
commented
Jun 15, 2019
@jdm Sure |
lib.rs: Alloc feature Cargo.toml: New features and 2018 edition
For testing in development and CI
Method names are now matching std
| unsafe fn inline(&self) -> &A { | ||
| match *self { | ||
| SmallVecData::Inline(ref a) => a, | ||
| SmallVecData::Inline(ref a) => &*a.as_ptr(), |
There was a problem hiding this comment.
I believe it's unsound to return an &A that points to a possibly-uninitialized A. This method should be changed to return a raw pointer. (The callers of this method only need raw pointers anyways.)
| unsafe fn inline_mut(&mut self) -> &mut A { | ||
| match *self { | ||
| SmallVecData::Inline(ref mut a) => a, | ||
| SmallVecData::Inline(ref mut a) => &mut *a.as_mut_ptr(), |
There was a problem hiding this comment.
Like inline above, this method should be changed to return a raw pointer.
c410-f3r
commented
Jun 19, 2019
Thanks @mbrubeck |
c410-f3r
commented
Jul 4, 2019
Can I squash commits? |
jdm
commented
Jul 4, 2019
@SimonSapin How does this work relate to #157? |
SimonSapin
commented
Jul 4, 2019
I haven’t looked at the diff, but based on the description a lot of it is similar or equivalent. Only with a different approach: incremental changes v.s. rewrite. |
Based on this current work, I can apply @SimonSapin modifications in future PRs |
The const_generics feature is now fully functional. Is anything preventing this PR from being merged? |
While experimenting with const generics in a branch is fine, I would prefer not to have them in the
I realize this is not exactly what you meant, but that’s an overstatement. Using |
I am sorry for the misunderstanding. Early versions of this PR contained a non-functional implementation for constant generics and it is now properly fixed.
It is the own nature of unstable Rustc features to break existing code in future releases, the same reason can be applied to already included unstable features of Nevertheless, if you guys feel comfortable enough to merge this code without constant generics, I can extract it into a separate PR. |
|
bors-servo
commented
Aug 10, 2019
☔ The latest upstream changes (presumably #159) made this pull request unmergeable. Please resolve the merge conflicts. |
emilio
commented
Oct 19, 2019
I think most of this stuff has landed already incrementally... Should this be closed? |
emilio
commented
Oct 19, 2019
(Like, constant generics and other improvements are still welcome I guess, but this PR as is is pretty unlikely to land) |
mbrubeck
commented
Oct 28, 2019
I cherry-picked and landed some of the changes from this that weren't covered by other PRs. I'm closing this now but feel free to open new PRs for any remaining changes. Smaller, incremental patches are appreciated if possible. Thanks! |
Fixes#154 and some other things.
allocfeature and doesn't remove thestdfeature because ofstd::io::Write.mem::uninitializedwithMaybeUninit.NonNull<T>instead of*mut T.VecLike.core::hint::unreachable_uncheckedinstead ofunchecked.lib.rsfile into smaller modules for better readability, localization and maintainability.1.36.2018epochversion.This change is