File tree 4 files changed +1053
-224
lines changed
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/).
16
16
- Added ` Vec::spare_capacity_mut ` .
17
17
- Added ` Extend ` impls for ` Deque ` .
18
18
- Added ` Deque::make_contiguous ` .
19
+ - Added ` VecView ` , the ` !Sized ` version of ` Vec ` .
19
20
20
21
### Changed
21
22
Original file line number Diff line number Diff line change @@ -72,19 +72,19 @@ error[E0277]: `*const ()` cannot be sent between threads safely
72
72
22 | is_send::<Vec<NotSend, 4>>();
73
73
| ^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
74
74
|
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 ()`
76
76
note: required because it appears within the type `PhantomData<*const ()>`
77
77
--> $RUST/core/src/marker.rs
78
78
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
79
79
--> $RUST/core/src/mem/manually_drop.rs
80
80
note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
81
81
--> $RUST/core/src/mem/maybe_uninit.rs
82
82
= 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] >`
84
84
--> $HEAPLESS/src/vec.rs
85
85
|
86
- | pub struct Vec<T, const N: usize > {
87
- | ^^^
86
+ | pub struct VecInner<B: ?Sized + VecDrop > {
87
+ | ^^^^^^^^
88
88
note: required by a bound in `is_send`
89
89
--> ui/not-send.rs:14:8
90
90
|
Original file line number Diff line number Diff line change @@ -88,7 +88,14 @@ pub use indexmap::{
88
88
pub use indexset:: { FnvIndexSet , IndexSet , Iter as IndexSetIter } ;
89
89
pub use linear_map:: LinearMap ;
90
90
pub 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 } ;
92
99
93
100
#[ macro_use]
94
101
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments