File tree Expand file tree Collapse file tree 4 files changed +1053
-224
lines changed Expand file tree Collapse file tree 4 files changed +1053
-224
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1616- Added ` Vec::spare_capacity_mut ` .
1717- Added ` Extend ` impls for ` Deque ` .
1818- Added ` Deque::make_contiguous ` .
19+ - Added ` VecView ` , the ` !Sized ` version of ` Vec ` .
1920
2021### Changed
2122
Original file line number Diff line number Diff line change @@ -72,19 +72,19 @@ error[E0277]: `*const ()` cannot be sent between threads safely
727222 | is_send::<Vec<NotSend, 4>>();
7373 | ^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
7474 |
75- = help: within `heapless::Vec< PhantomData<*const ()>, 4 >`, the trait `Send` is not implemented for `*const ()`
75+ = help: within `heapless::vec::VecInner<[MaybeUninit< PhantomData<*const ()>>; 4] >`, the trait `Send` is not implemented for `*const ()`
7676note: required because it appears within the type `PhantomData<*const ()>`
7777 --> $RUST/core/src/marker.rs
7878note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
7979 --> $RUST/core/src/mem/manually_drop.rs
8080note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
8181 --> $RUST/core/src/mem/maybe_uninit.rs
8282 = note: required because it appears within the type `[MaybeUninit<PhantomData<*const ()>>; 4]`
83- note: required because it appears within the type `Vec< PhantomData<*const ()>, 4 >`
83+ note: required because it appears within the type `VecInner<[MaybeUninit< PhantomData<*const ()>>; 4] >`
8484 --> $HEAPLESS/src/vec.rs
8585 |
86- | pub struct Vec<T, const N: usize > {
87- | ^^^
86+ | pub struct VecInner<B: ?Sized + VecDrop > {
87+ | ^^^^^^^^
8888note: required by a bound in `is_send`
8989 --> ui/not-send.rs:14:8
9090 |
Original file line number Diff line number Diff line change @@ -88,7 +88,14 @@ pub use indexmap::{
8888pub use indexset:: { FnvIndexSet , IndexSet , Iter as IndexSetIter } ;
8989pub use linear_map:: LinearMap ;
9090pub use string:: String ;
91- pub use vec:: Vec ;
91+
92+ // Workaround https://github.com/rust-lang/rust/issues/119015. This is required so that the methods on `VecView` and `Vec` are properly documented.
93+ // cfg(doc) prevents `VecInner` being part of the public API.
94+ // doc(hidden) prevents the `pub use vec::VecInner` from being visible in the documentation.
95+ #[ cfg( doc) ]
96+ #[ doc( hidden) ]
97+ pub use vec:: VecInner as _;
98+ pub use vec:: { Vec , VecView } ;
9299
93100#[ macro_use]
94101#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments