-
Notifications
You must be signed in to change notification settings - Fork 182
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 #388 from newAM/fix-linear-map-drop
Fix dropping_references warning
- Loading branch information
Showing
5 changed files
with
83 additions
and
46 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,99 +1,123 @@ | ||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:19:15 | ||
--> ui/not-send.rs:19:15 | ||
| | ||
19 | is_send::<Consumer<NotSend, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
= 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 it appears within the type `PhantomData<*const ()>` | ||
--> $RUST/core/src/marker.rs | ||
= note: required for `Consumer<'_, PhantomData<*const ()>, 4>` to implement `Send` | ||
note: required by a bound in `is_send` | ||
--> $DIR/not-send.rs:14:8 | ||
--> ui/not-send.rs:14:8 | ||
| | ||
12 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
| ------- required by a bound in this function | ||
13 | where | ||
14 | T: Send, | ||
| ^^^^ required by this bound in `is_send` | ||
|
||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:20:15 | ||
--> ui/not-send.rs:20:15 | ||
| | ||
20 | is_send::<Producer<NotSend, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
= 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 it appears within the type `PhantomData<*const ()>` | ||
--> $RUST/core/src/marker.rs | ||
= note: required for `Producer<'_, PhantomData<*const ()>, 4>` to implement `Send` | ||
note: required by a bound in `is_send` | ||
--> $DIR/not-send.rs:14:8 | ||
--> ui/not-send.rs:14:8 | ||
| | ||
12 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
| ------- required by a bound in this function | ||
13 | where | ||
14 | T: Send, | ||
| ^^^^ required by this bound in `is_send` | ||
|
||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:21:15 | ||
--> ui/not-send.rs:21:15 | ||
| | ||
21 | is_send::<Queue<NotSend, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
= help: within `Queue<PhantomData<*const ()>, 4>`, 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 `ManuallyDrop<PhantomData<*const ()>>` | ||
= note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>` | ||
= note: required because it appears within the type `UnsafeCell<MaybeUninit<PhantomData<*const ()>>>` | ||
note: required because it appears within the type `PhantomData<*const ()>` | ||
--> $RUST/core/src/marker.rs | ||
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>` | ||
--> $RUST/core/src/mem/manually_drop.rs | ||
note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>` | ||
--> $RUST/core/src/mem/maybe_uninit.rs | ||
note: required because it appears within the type `UnsafeCell<MaybeUninit<PhantomData<*const ()>>>` | ||
--> $RUST/core/src/cell.rs | ||
= note: required because it appears within the type `[UnsafeCell<MaybeUninit<PhantomData<*const ()>>>; 4]` | ||
= note: required because it appears within the type `Queue<PhantomData<*const ()>, 4>` | ||
note: required because it appears within the type `Queue<PhantomData<*const ()>, 4>` | ||
--> $HEAPLESS/src/spsc.rs | ||
| | ||
| pub struct Queue<T, const N: usize> { | ||
| ^^^^^ | ||
note: required by a bound in `is_send` | ||
--> $DIR/not-send.rs:14:8 | ||
--> ui/not-send.rs:14:8 | ||
| | ||
12 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
| ------- required by a bound in this function | ||
13 | where | ||
14 | T: Send, | ||
| ^^^^ required by this bound in `is_send` | ||
|
||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:22:15 | ||
--> ui/not-send.rs:22:15 | ||
| | ||
22 | is_send::<Vec<NotSend, 4>>(); | ||
| ^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
= help: within `heapless::Vec<PhantomData<*const ()>, 4>`, 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 `ManuallyDrop<PhantomData<*const ()>>` | ||
= note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>` | ||
note: required because it appears within the type `PhantomData<*const ()>` | ||
--> $RUST/core/src/marker.rs | ||
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>` | ||
--> $RUST/core/src/mem/manually_drop.rs | ||
note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>` | ||
--> $RUST/core/src/mem/maybe_uninit.rs | ||
= 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>` | ||
note: required because it appears within the type `Vec<PhantomData<*const ()>, 4>` | ||
--> $HEAPLESS/src/vec.rs | ||
| | ||
| pub struct Vec<T, const N: usize> { | ||
| ^^^ | ||
note: required by a bound in `is_send` | ||
--> $DIR/not-send.rs:14:8 | ||
--> ui/not-send.rs:14:8 | ||
| | ||
12 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
| ------- required by a bound in this function | ||
13 | where | ||
14 | T: Send, | ||
| ^^^^ required by this bound in `is_send` | ||
|
||
error[E0277]: `*const ()` cannot be sent between threads safely | ||
--> $DIR/not-send.rs:23:15 | ||
--> ui/not-send.rs:23:15 | ||
| | ||
23 | is_send::<HistoryBuffer<NotSend, 4>>(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely | ||
| | ||
= help: within `HistoryBuffer<PhantomData<*const ()>, 4>`, 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 `ManuallyDrop<PhantomData<*const ()>>` | ||
= note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>` | ||
note: required because it appears within the type `PhantomData<*const ()>` | ||
--> $RUST/core/src/marker.rs | ||
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>` | ||
--> $RUST/core/src/mem/manually_drop.rs | ||
note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>` | ||
--> $RUST/core/src/mem/maybe_uninit.rs | ||
= note: required because it appears within the type `[MaybeUninit<PhantomData<*const ()>>; 4]` | ||
= note: required because it appears within the type `HistoryBuffer<PhantomData<*const ()>, 4>` | ||
note: required because it appears within the type `HistoryBuffer<PhantomData<*const ()>, 4>` | ||
--> $HEAPLESS/src/histbuf.rs | ||
| | ||
| pub struct HistoryBuffer<T, const N: usize> { | ||
| ^^^^^^^^^^^^^ | ||
note: required by a bound in `is_send` | ||
--> $DIR/not-send.rs:14:8 | ||
--> ui/not-send.rs:14:8 | ||
| | ||
12 | fn is_send<T>() | ||
| ------- required by a bound in this | ||
| ------- required by a bound in this function | ||
13 | where | ||
14 | T: Send, | ||
| ^^^^ required by this bound in `is_send` |
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