-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from kpp/const_generics
Fix several issues in const generics
- Loading branch information
Showing
10 changed files
with
85 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,69 @@ | ||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:19:5 | ||
| | ||
19 | is_send::<Consumer<NotSend, consts::U4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:18:5 | ||
| | ||
= help: within `std::marker::PhantomData<*const ()>`, the trait `std::marker::Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `std::marker::PhantomData<*const ()>` | ||
= note: required because of the requirements on the impl of `std::marker::Send` for `heapless::spsc::split::Consumer<'_, std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>` | ||
note: required by `is_send` | ||
--> $DIR/not-send.rs:12:1 | ||
11 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
12 | where | ||
13 | T: Send, | ||
| ---- required by this bound in `is_send` | ||
... | ||
18 | is_send::<Consumer<NotSend, _, _, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
12 | / fn is_send<T>() | ||
13 | | where | ||
14 | | T: Send, | ||
15 | | { | ||
16 | | } | ||
| |_^ | ||
= help: within `PhantomData<*const ()>`, the trait `Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `PhantomData<*const ()>` | ||
= note: required because of the requirements on the impl of `Send` for `Consumer<'_, PhantomData<*const ()>, _, _, 4_usize>` | ||
|
||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:20:5 | ||
| | ||
20 | is_send::<Producer<NotSend, consts::U4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:19:5 | ||
| | ||
= help: within `std::marker::PhantomData<*const ()>`, the trait `std::marker::Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `std::marker::PhantomData<*const ()>` | ||
= note: required because of the requirements on the impl of `std::marker::Send` for `heapless::spsc::split::Producer<'_, std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>` | ||
note: required by `is_send` | ||
--> $DIR/not-send.rs:12:1 | ||
11 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
12 | where | ||
13 | T: Send, | ||
| ---- required by this bound in `is_send` | ||
... | ||
19 | is_send::<Producer<NotSend, _, _, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
12 | / fn is_send<T>() | ||
13 | | where | ||
14 | | T: Send, | ||
15 | | { | ||
16 | | } | ||
| |_^ | ||
= help: within `PhantomData<*const ()>`, the trait `Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `PhantomData<*const ()>` | ||
= note: required because of the requirements on the impl of `Send` for `Producer<'_, PhantomData<*const ()>, _, _, 4_usize>` | ||
|
||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:21:5 | ||
| | ||
21 | is_send::<Queue<NotSend, consts::U4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:20:5 | ||
| | ||
= help: within `std::marker::PhantomData<*const ()>`, the trait `std::marker::Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `std::marker::PhantomData<*const ()>` | ||
= note: required because of the requirements on the impl of `std::marker::Send` for `generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>` | ||
= note: required because it appears within the type `std::mem::ManuallyDrop<generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>>` | ||
= note: required because it appears within the type `std::mem::MaybeUninit<generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>>` | ||
= note: required because it appears within the type `heapless::i::Queue<generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>>` | ||
= note: required because it appears within the type `heapless::spsc::Queue<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>` | ||
note: required by `is_send` | ||
--> $DIR/not-send.rs:12:1 | ||
11 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
12 | where | ||
13 | T: Send, | ||
| ---- required by this bound in `is_send` | ||
... | ||
20 | is_send::<Queue<NotSend, _, _, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
12 | / fn is_send<T>() | ||
13 | | where | ||
14 | | T: Send, | ||
15 | | { | ||
16 | | } | ||
| |_^ | ||
= help: within `Queue<PhantomData<*const ()>, _, _, 4_usize>`, the trait `Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `PhantomData<*const ()>` | ||
= note: required because it appears within the type `[PhantomData<*const ()>; 4]` | ||
= note: required because it appears within the type `ManuallyDrop<[PhantomData<*const ()>; 4]>` | ||
= note: required because it appears within the type `MaybeUninit<[PhantomData<*const ()>; 4]>` | ||
= note: required because it appears within the type `Queue<PhantomData<*const ()>, _, _, 4_usize>` | ||
|
||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:22:5 | ||
| | ||
22 | is_send::<heapless::Vec<NotSend, consts::U4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:21:5 | ||
| | ||
= help: within `std::marker::PhantomData<*const ()>`, the trait `std::marker::Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `std::marker::PhantomData<*const ()>` | ||
= note: required because of the requirements on the impl of `std::marker::Send` for `generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>` | ||
= note: required because it appears within the type `std::mem::ManuallyDrop<generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>>` | ||
= note: required because it appears within the type `std::mem::MaybeUninit<generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>>` | ||
= note: required because it appears within the type `heapless::i::Vec<generic_array::GenericArray<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>>` | ||
= note: required because it appears within the type `heapless::vec::Vec<std::marker::PhantomData<*const ()>, typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>, typenum::bit::B0>, typenum::bit::B0>>` | ||
note: required by `is_send` | ||
--> $DIR/not-send.rs:12:1 | ||
11 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
12 | where | ||
13 | T: Send, | ||
| ---- required by this bound in `is_send` | ||
... | ||
21 | is_send::<heapless::Vec<NotSend, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
12 | / fn is_send<T>() | ||
13 | | where | ||
14 | | T: Send, | ||
15 | | { | ||
16 | | } | ||
| |_^ | ||
= help: within `heapless::Vec<PhantomData<*const ()>, 4_usize>`, the trait `Send` is not implemented for `*const ()` | ||
= note: required because it appears within the type `PhantomData<*const ()>` | ||
= note: required because it appears within the type `[PhantomData<*const ()>; 4]` | ||
= note: required because it appears within the type `ManuallyDrop<[PhantomData<*const ()>; 4]>` | ||
= note: required because it appears within the type `MaybeUninit<[PhantomData<*const ()>; 4]>` | ||
= note: required because it appears within the type `heapless::Vec<PhantomData<*const ()>, 4_usize>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters