Skip to content

Commit 6dbefb4

Browse files
committed
Fix CI.
1 parent c593fa5 commit 6dbefb4

File tree

7 files changed

+44
-8
lines changed

7 files changed

+44
-8
lines changed

cfail/ui/not-send.stderr

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ error[E0277]: `*const ()` cannot be sent between threads safely
77
= help: within `PhantomData<*const ()>`, the trait `Send` is not implemented for `*const ()`
88
note: required because it appears within the type `PhantomData<*const ()>`
99
--> $RUST/core/src/marker.rs
10+
|
11+
| pub struct PhantomData<T: ?Sized>;
12+
| ^^^^^^^^^^^
1013
= note: required for `Consumer<'_, PhantomData<*const ()>, 4>` to implement `Send`
1114
note: required by a bound in `is_send`
1215
--> ui/not-send.rs:14:8
@@ -26,6 +29,9 @@ error[E0277]: `*const ()` cannot be sent between threads safely
2629
= help: within `PhantomData<*const ()>`, the trait `Send` is not implemented for `*const ()`
2730
note: required because it appears within the type `PhantomData<*const ()>`
2831
--> $RUST/core/src/marker.rs
32+
|
33+
| pub struct PhantomData<T: ?Sized>;
34+
| ^^^^^^^^^^^
2935
= note: required for `Producer<'_, PhantomData<*const ()>, 4>` to implement `Send`
3036
note: required by a bound in `is_send`
3137
--> ui/not-send.rs:14:8
@@ -45,12 +51,24 @@ error[E0277]: `*const ()` cannot be sent between threads safely
4551
= help: within `Queue<PhantomData<*const ()>, 4>`, the trait `Send` is not implemented for `*const ()`
4652
note: required because it appears within the type `PhantomData<*const ()>`
4753
--> $RUST/core/src/marker.rs
54+
|
55+
| pub struct PhantomData<T: ?Sized>;
56+
| ^^^^^^^^^^^
4857
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
4958
--> $RUST/core/src/mem/manually_drop.rs
59+
|
60+
| pub struct ManuallyDrop<T: ?Sized> {
61+
| ^^^^^^^^^^^^
5062
note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
5163
--> $RUST/core/src/mem/maybe_uninit.rs
64+
|
65+
| pub union MaybeUninit<T> {
66+
| ^^^^^^^^^^^
5267
note: required because it appears within the type `UnsafeCell<MaybeUninit<PhantomData<*const ()>>>`
5368
--> $RUST/core/src/cell.rs
69+
|
70+
| pub struct UnsafeCell<T: ?Sized> {
71+
| ^^^^^^^^^^
5472
= note: required because it appears within the type `[UnsafeCell<MaybeUninit<PhantomData<*const ()>>>; 4]`
5573
note: required because it appears within the type `Queue<PhantomData<*const ()>, 4>`
5674
--> $HEAPLESS/src/spsc.rs
@@ -75,12 +93,21 @@ error[E0277]: `*const ()` cannot be sent between threads safely
7593
= help: within `heapless::vec::VecInner<[MaybeUninit<PhantomData<*const ()>>; 4]>`, the trait `Send` is not implemented for `*const ()`
7694
note: required because it appears within the type `PhantomData<*const ()>`
7795
--> $RUST/core/src/marker.rs
96+
|
97+
| pub struct PhantomData<T: ?Sized>;
98+
| ^^^^^^^^^^^
7899
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
79100
--> $RUST/core/src/mem/manually_drop.rs
101+
|
102+
| pub struct ManuallyDrop<T: ?Sized> {
103+
| ^^^^^^^^^^^^
80104
note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
81105
--> $RUST/core/src/mem/maybe_uninit.rs
106+
|
107+
| pub union MaybeUninit<T> {
108+
| ^^^^^^^^^^^
82109
= note: required because it appears within the type `[MaybeUninit<PhantomData<*const ()>>; 4]`
83-
note: required because it appears within the type `VecInner<[MaybeUninit<PhantomData<*const ()>>; 4]>`
110+
note: required because it appears within the type `heapless::vec::VecInner<[MaybeUninit<PhantomData<*const ()>>; 4]>`
84111
--> $HEAPLESS/src/vec.rs
85112
|
86113
| pub struct VecInner<B: ?Sized + VecDrop> {
@@ -103,10 +130,19 @@ error[E0277]: `*const ()` cannot be sent between threads safely
103130
= help: within `HistoryBuffer<PhantomData<*const ()>, 4>`, the trait `Send` is not implemented for `*const ()`
104131
note: required because it appears within the type `PhantomData<*const ()>`
105132
--> $RUST/core/src/marker.rs
133+
|
134+
| pub struct PhantomData<T: ?Sized>;
135+
| ^^^^^^^^^^^
106136
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
107137
--> $RUST/core/src/mem/manually_drop.rs
138+
|
139+
| pub struct ManuallyDrop<T: ?Sized> {
140+
| ^^^^^^^^^^^^
108141
note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
109142
--> $RUST/core/src/mem/maybe_uninit.rs
143+
|
144+
| pub union MaybeUninit<T> {
145+
| ^^^^^^^^^^^
110146
= note: required because it appears within the type `[MaybeUninit<PhantomData<*const ()>>; 4]`
111147
note: required because it appears within the type `HistoryBuffer<PhantomData<*const ()>, 4>`
112148
--> $HEAPLESS/src/histbuf.rs

src/binary_heap.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,13 @@ where
564564

565565
#[cfg(test)]
566566
mod tests {
567-
use std::vec::Vec;
567+
use static_assertions::assert_not_impl_any;
568568

569-
use crate::binary_heap::{BinaryHeap, Max, Min};
569+
use super::{BinaryHeap, Max, Min};
570+
571+
// Ensure a `BinaryHeap` containing `!Send` values stays `!Send` itself.
572+
assert_not_impl_any!(BinaryHeap<*const (), Max, 4>: Send);
573+
assert_not_impl_any!(BinaryHeap<*const (), Min, 4>: Send);
570574

571575
#[test]
572576
fn static_new() {

src/indexmap.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use core::{
22
borrow::Borrow,
33
fmt,
44
hash::{BuildHasher, Hash},
5-
iter::FromIterator,
65
mem,
76
num::NonZeroU32,
87
ops, slice,

src/indexset.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use core::{
33
borrow::Borrow,
44
fmt,
55
hash::{BuildHasher, Hash},
6-
iter::FromIterator,
76
};
87
use hash32::{BuildHasherDefault, FnvHasher};
98

src/linear_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::Vec;
2-
use core::{borrow::Borrow, fmt, iter::FromIterator, mem, ops, slice};
2+
use core::{borrow::Borrow, fmt, mem, ops, slice};
33

44
/// A fixed capacity map/dictionary that performs lookups via linear search.
55
///

src/string.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ impl_try_from_num!(u64, 20);
733733
#[cfg(test)]
734734
mod tests {
735735
use crate::{String, Vec};
736-
use core::convert::TryFrom;
737736

738737
#[test]
739738
fn static_new() {

src/vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use core::{
22
cmp::Ordering,
33
fmt, hash,
4-
iter::FromIterator,
54
mem,
65
mem::{ManuallyDrop, MaybeUninit},
76
ops, ptr, slice,

0 commit comments

Comments
 (0)