mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-10-02 14:54:30 +00:00
Add CI config from main branch, fix build.
This commit is contained in:
parent
06bd308da4
commit
0a35fbfa7f
3
.github/bors.toml
vendored
3
.github/bors.toml
vendored
@ -1,3 +0,0 @@
|
|||||||
block_labels = ["S-blocked"]
|
|
||||||
delete_merged_branches = true
|
|
||||||
status = ["ci"]
|
|
273
.github/workflows/build.yml
vendored
273
.github/workflows/build.yml
vendored
@ -1,35 +1,104 @@
|
|||||||
name: Build
|
name: Build
|
||||||
on:
|
on:
|
||||||
|
merge_group:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
|
||||||
push:
|
push:
|
||||||
branches: [main, staging, trying]
|
branches: [v0.7.x]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# Run MIRI tests on nightly
|
||||||
|
# NOTE first because it takes the longest to complete
|
||||||
|
testmiri:
|
||||||
|
name: testmiri
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache cargo dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
- ~/.cargo/bin/
|
||||||
|
- ~/.cargo/registry/index/
|
||||||
|
- ~/.cargo/registry/cache/
|
||||||
|
- ~/.cargo/git/db/
|
||||||
|
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.OS }}-cargo-
|
||||||
|
|
||||||
|
- name: Cache build output dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.OS }}-build-
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
components: miri
|
||||||
|
|
||||||
|
- name: Run miri
|
||||||
|
run: MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
|
||||||
|
|
||||||
|
# Run cargo test
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache cargo dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
- ~/.cargo/bin/
|
||||||
|
- ~/.cargo/registry/index/
|
||||||
|
- ~/.cargo/registry/cache/
|
||||||
|
- ~/.cargo/git/db/
|
||||||
|
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.OS }}-cargo-
|
||||||
|
|
||||||
|
- name: Cache build output dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.OS }}-build-
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Run cargo test
|
||||||
|
run: cargo test
|
||||||
|
|
||||||
# Run cargo fmt --check
|
# Run cargo fmt --check
|
||||||
style:
|
style:
|
||||||
name: style
|
name: style
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
|
|
||||||
- name: cargo fmt --check
|
- name: cargo fmt --check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo fmt --all -- --check
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
|
|
||||||
# Compilation check
|
# Compilation check
|
||||||
check:
|
check:
|
||||||
@ -46,19 +115,12 @@ jobs:
|
|||||||
- thumbv7m-none-eabi
|
- thumbv7m-none-eabi
|
||||||
- thumbv8m.base-none-eabi
|
- thumbv8m.base-none-eabi
|
||||||
- thumbv8m.main-none-eabi
|
- thumbv8m.main-none-eabi
|
||||||
toolchain:
|
|
||||||
- stable
|
|
||||||
- nightly
|
|
||||||
features:
|
|
||||||
- ""
|
|
||||||
- "cas"
|
|
||||||
- "serde"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- name: Cache cargo dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
- ~/.cargo/bin/
|
- ~/.cargo/bin/
|
||||||
@ -71,7 +133,7 @@ jobs:
|
|||||||
${{ runner.OS }}-cargo-
|
${{ runner.OS }}-cargo-
|
||||||
|
|
||||||
- name: Cache build output dependencies
|
- name: Cache build output dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
@ -79,19 +141,16 @@ jobs:
|
|||||||
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
${{ runner.OS }}-build-
|
${{ runner.OS }}-build-
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
|
- name: Install Rust with target (${{ matrix.target }})
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: stable
|
||||||
target: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: cargo check
|
- name: cargo check
|
||||||
uses: actions-rs/cargo@v1
|
run: |
|
||||||
with:
|
cargo check --target=${{ matrix.target }}
|
||||||
use-cross: false
|
cargo check --target=${{ matrix.target }} --features="ufmt-impl serde defmt-impl mpmc_large"
|
||||||
command: check
|
|
||||||
args: --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
|
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
name: doc
|
name: doc
|
||||||
@ -101,16 +160,12 @@ jobs:
|
|||||||
target:
|
target:
|
||||||
- x86_64-unknown-linux-gnu
|
- x86_64-unknown-linux-gnu
|
||||||
- thumbv7m-none-eabi
|
- thumbv7m-none-eabi
|
||||||
features:
|
|
||||||
- ""
|
|
||||||
- "cas"
|
|
||||||
- "serde"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- name: Cache cargo dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
- ~/.cargo/bin/
|
- ~/.cargo/bin/
|
||||||
@ -123,7 +178,7 @@ jobs:
|
|||||||
${{ runner.OS }}-cargo-
|
${{ runner.OS }}-cargo-
|
||||||
|
|
||||||
- name: Cache build output dependencies
|
- name: Cache build output dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
@ -131,19 +186,14 @@ jobs:
|
|||||||
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
${{ runner.OS }}-build-
|
${{ runner.OS }}-build-
|
||||||
|
|
||||||
- name: Install stable Rust with target (${{ matrix.target }})
|
- name: Install nightly Rust with target (${{ matrix.target }})
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
targets: ${{ matrix.target }}
|
||||||
target: ${{ matrix.target }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: cargo doc
|
- name: cargo rustdoc
|
||||||
uses: actions-rs/cargo@v1
|
env: {"RUSTDOCFLAGS": "-D warnings --cfg docsrs"}
|
||||||
with:
|
run: cargo rustdoc --target=${{ matrix.target }} --features="ufmt-impl serde defmt-impl mpmc_large"
|
||||||
use-cross: false
|
|
||||||
command: doc
|
|
||||||
args: --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
|
|
||||||
|
|
||||||
# Run cpass tests
|
# Run cpass tests
|
||||||
testcpass:
|
testcpass:
|
||||||
@ -154,21 +204,15 @@ jobs:
|
|||||||
target:
|
target:
|
||||||
- x86_64-unknown-linux-gnu
|
- x86_64-unknown-linux-gnu
|
||||||
- i686-unknown-linux-musl
|
- i686-unknown-linux-musl
|
||||||
toolchain:
|
|
||||||
- stable
|
|
||||||
- nightly
|
|
||||||
- 1.51.0
|
|
||||||
features:
|
|
||||||
- serde
|
|
||||||
buildtype:
|
buildtype:
|
||||||
- ""
|
- ""
|
||||||
- "--release"
|
- "--release"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- name: Cache cargo dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
- ~/.cargo/bin/
|
- ~/.cargo/bin/
|
||||||
@ -181,7 +225,7 @@ jobs:
|
|||||||
${{ runner.OS }}-cargo-
|
${{ runner.OS }}-cargo-
|
||||||
|
|
||||||
- name: Cache build output dependencies
|
- name: Cache build output dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
@ -189,17 +233,14 @@ jobs:
|
|||||||
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
${{ runner.OS }}-build-
|
${{ runner.OS }}-build-
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
|
- name: Install Rust with target (${{ matrix.target }})
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: stable
|
||||||
target: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
- name: cargo test
|
||||||
with:
|
run: cargo test --test cpass --target=${{ matrix.target }} --features=serde ${{ matrix.buildtype }}
|
||||||
use-cross: false
|
|
||||||
command: test
|
|
||||||
args: --test cpass --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }}
|
|
||||||
|
|
||||||
# Run test suite for UI
|
# Run test suite for UI
|
||||||
testtsan:
|
testtsan:
|
||||||
@ -209,19 +250,15 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
- x86_64-unknown-linux-gnu
|
- x86_64-unknown-linux-gnu
|
||||||
toolchain:
|
|
||||||
- nightly
|
|
||||||
features:
|
|
||||||
- x86-sync-pool
|
|
||||||
buildtype:
|
buildtype:
|
||||||
- ""
|
- ""
|
||||||
- "--release"
|
- "--release"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- name: Cache cargo dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
- ~/.cargo/bin/
|
- ~/.cargo/bin/
|
||||||
@ -233,19 +270,19 @@ jobs:
|
|||||||
${{ runner.OS }}-cargo-
|
${{ runner.OS }}-cargo-
|
||||||
|
|
||||||
- name: Cache build output dependencies
|
- name: Cache build output dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.OS }}-build-
|
${{ runner.OS }}-build-
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
|
- name: Install Rust nightly with target (${{ matrix.target }})
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: nightly
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
override: true
|
components: rust-src
|
||||||
|
|
||||||
- name: Export variables
|
- name: Export variables
|
||||||
run: |
|
run: |
|
||||||
@ -253,11 +290,8 @@ jobs:
|
|||||||
echo TSAN_OPTIONS="suppressions=$(pwd)/suppressions.txt" >> $GITHUB_ENV
|
echo TSAN_OPTIONS="suppressions=$(pwd)/suppressions.txt" >> $GITHUB_ENV
|
||||||
echo $GITHUB_ENV
|
echo $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- name: cargo test
|
||||||
with:
|
run: cargo test -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
|
||||||
use-cross: false
|
|
||||||
command: test
|
|
||||||
args: --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
|
|
||||||
|
|
||||||
# Run cfail tests on MSRV
|
# Run cfail tests on MSRV
|
||||||
testcfail:
|
testcfail:
|
||||||
@ -269,10 +303,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- name: Cache cargo dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
- ~/.cargo/bin/
|
- ~/.cargo/bin/
|
||||||
@ -284,7 +318,7 @@ jobs:
|
|||||||
${{ runner.OS }}-cargo-
|
${{ runner.OS }}-cargo-
|
||||||
|
|
||||||
- name: Cache build output dependencies
|
- name: Cache build output dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
@ -292,70 +326,7 @@ jobs:
|
|||||||
${{ runner.OS }}-build-
|
${{ runner.OS }}-build-
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
|
||||||
toolchain: 1.51.0
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Run cargo
|
- name: Run cargo
|
||||||
run: cargo run
|
run: cargo run
|
||||||
|
|
||||||
|
|
||||||
# Run MIRI tests on nightly
|
|
||||||
testmiri:
|
|
||||||
name: testmiri
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
- ~/.cargo/bin/
|
|
||||||
- ~/.cargo/registry/index/
|
|
||||||
- ~/.cargo/registry/cache/
|
|
||||||
- ~/.cargo/git/db/
|
|
||||||
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.OS }}-cargo-
|
|
||||||
|
|
||||||
- name: Cache build output dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.OS }}-build-
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: nightly
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
components: miri
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Run miri
|
|
||||||
run: MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
|
|
||||||
|
|
||||||
# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
|
|
||||||
#
|
|
||||||
# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
|
|
||||||
|
|
||||||
ci-success:
|
|
||||||
name: ci
|
|
||||||
if: github.event_name == 'push' && success()
|
|
||||||
needs:
|
|
||||||
- style
|
|
||||||
- check
|
|
||||||
- doc
|
|
||||||
- testcpass
|
|
||||||
- testtsan
|
|
||||||
- testcfail
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Mark the job as a success
|
|
||||||
run: exit 0
|
|
||||||
|
2
.github/workflows/changelog.yml
vendored
2
.github/workflows/changelog.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Check that changelog updated
|
- name: Check that changelog updated
|
||||||
uses: dangoslen/changelog-enforcer@v3
|
uses: dangoslen/changelog-enforcer@v3
|
||||||
|
@ -1,89 +1,123 @@
|
|||||||
error[E0277]: `*const ()` cannot be sent between threads safely
|
error[E0277]: `*const ()` cannot be sent between threads safely
|
||||||
--> $DIR/not-send.rs:19:5
|
--> ui/not-send.rs:19:15
|
||||||
|
|
|
|
||||||
12 | fn is_send<T>()
|
|
||||||
| ------- required by a bound in this
|
|
||||||
13 | where
|
|
||||||
14 | T: Send,
|
|
||||||
| ---- required by this bound in `is_send`
|
|
||||||
...
|
|
||||||
19 | is_send::<Consumer<NotSend, 4>>();
|
19 | is_send::<Consumer<NotSend, 4>>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
| ^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
||||||
|
|
|
|
||||||
= help: within `PhantomData<*const ()>`, the trait `Send` is not implemented for `*const ()`
|
= 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 ()>`
|
||||||
= note: required because of the requirements on the impl of `Send` for `Consumer<'_, PhantomData<*const ()>, 4_usize>`
|
--> $RUST/core/src/marker.rs
|
||||||
|
= note: required for `Consumer<'_, PhantomData<*const ()>, 4>` to implement `Send`
|
||||||
error[E0277]: `*const ()` cannot be sent between threads safely
|
note: required by a bound in `is_send`
|
||||||
--> $DIR/not-send.rs:20:5
|
--> ui/not-send.rs:14:8
|
||||||
|
|
|
|
||||||
12 | fn is_send<T>()
|
12 | fn is_send<T>()
|
||||||
| ------- required by a bound in this
|
| ------- required by a bound in this function
|
||||||
13 | where
|
13 | where
|
||||||
14 | T: Send,
|
14 | T: Send,
|
||||||
| ---- required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
...
|
|
||||||
|
error[E0277]: `*const ()` cannot be sent between threads safely
|
||||||
|
--> ui/not-send.rs:20:15
|
||||||
|
|
|
||||||
20 | is_send::<Producer<NotSend, 4>>();
|
20 | is_send::<Producer<NotSend, 4>>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
| ^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
||||||
|
|
|
|
||||||
= help: within `PhantomData<*const ()>`, the trait `Send` is not implemented for `*const ()`
|
= 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 ()>`
|
||||||
= note: required because of the requirements on the impl of `Send` for `Producer<'_, PhantomData<*const ()>, 4_usize>`
|
--> $RUST/core/src/marker.rs
|
||||||
|
= note: required for `Producer<'_, PhantomData<*const ()>, 4>` to implement `Send`
|
||||||
error[E0277]: `*const ()` cannot be sent between threads safely
|
note: required by a bound in `is_send`
|
||||||
--> $DIR/not-send.rs:21:5
|
--> ui/not-send.rs:14:8
|
||||||
|
|
|
|
||||||
12 | fn is_send<T>()
|
12 | fn is_send<T>()
|
||||||
| ------- required by a bound in this
|
| ------- required by a bound in this function
|
||||||
13 | where
|
13 | where
|
||||||
14 | T: Send,
|
14 | T: Send,
|
||||||
| ---- required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
...
|
|
||||||
|
error[E0277]: `*const ()` cannot be sent between threads safely
|
||||||
|
--> ui/not-send.rs:21:15
|
||||||
|
|
|
||||||
21 | is_send::<Queue<NotSend, 4>>();
|
21 | is_send::<Queue<NotSend, 4>>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
| ^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
||||||
|
|
|
|
||||||
= help: within `Queue<PhantomData<*const ()>, 4_usize>`, the trait `Send` is not implemented for `*const ()`
|
= 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 `PhantomData<*const ()>`
|
||||||
= note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
|
--> $RUST/core/src/marker.rs
|
||||||
= note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
|
note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
|
||||||
= note: required because it appears within the type `UnsafeCell<MaybeUninit<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 `[UnsafeCell<MaybeUninit<PhantomData<*const ()>>>; 4]`
|
||||||
= note: required because it appears within the type `Queue<PhantomData<*const ()>, 4_usize>`
|
note: required because it appears within the type `Queue<PhantomData<*const ()>, 4>`
|
||||||
|
--> $HEAPLESS/src/spsc.rs
|
||||||
error[E0277]: `*const ()` cannot be sent between threads safely
|
|
|
||||||
--> $DIR/not-send.rs:22:5
|
| pub struct Queue<T, const N: usize> {
|
||||||
|
| ^^^^^
|
||||||
|
note: required by a bound in `is_send`
|
||||||
|
--> ui/not-send.rs:14:8
|
||||||
|
|
|
|
||||||
12 | fn is_send<T>()
|
12 | fn is_send<T>()
|
||||||
| ------- required by a bound in this
|
| ------- required by a bound in this function
|
||||||
13 | where
|
13 | where
|
||||||
14 | T: Send,
|
14 | T: Send,
|
||||||
| ---- required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
...
|
|
||||||
|
error[E0277]: `*const ()` cannot be sent between threads safely
|
||||||
|
--> ui/not-send.rs:22:15
|
||||||
|
|
|
||||||
22 | is_send::<Vec<NotSend, 4>>();
|
22 | is_send::<Vec<NotSend, 4>>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
| ^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
||||||
|
|
|
|
||||||
= help: within `heapless::Vec<PhantomData<*const ()>, 4_usize>`, the trait `Send` is not implemented for `*const ()`
|
= 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 `PhantomData<*const ()>`
|
||||||
= note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
|
--> $RUST/core/src/marker.rs
|
||||||
= note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
|
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 `[MaybeUninit<PhantomData<*const ()>>; 4]`
|
||||||
= note: required because it appears within the type `heapless::Vec<PhantomData<*const ()>, 4_usize>`
|
note: required because it appears within the type `Vec<PhantomData<*const ()>, 4>`
|
||||||
|
--> $HEAPLESS/src/vec.rs
|
||||||
error[E0277]: `*const ()` cannot be sent between threads safely
|
|
|
||||||
--> $DIR/not-send.rs:23:5
|
| pub struct Vec<T, const N: usize> {
|
||||||
|
| ^^^
|
||||||
|
note: required by a bound in `is_send`
|
||||||
|
--> ui/not-send.rs:14:8
|
||||||
|
|
|
|
||||||
12 | fn is_send<T>()
|
12 | fn is_send<T>()
|
||||||
| ------- required by a bound in this
|
| ------- required by a bound in this function
|
||||||
13 | where
|
13 | where
|
||||||
14 | T: Send,
|
14 | T: Send,
|
||||||
| ---- required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
...
|
|
||||||
23 | is_send::<HistoryBuffer<NotSend, 4>>();
|
error[E0277]: `*const ()` cannot be sent between threads safely
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
--> ui/not-send.rs:23:15
|
||||||
|
|
|
|
||||||
= help: within `HistoryBuffer<PhantomData<*const ()>, 4_usize>`, the trait `Send` is not implemented for `*const ()`
|
23 | is_send::<HistoryBuffer<NotSend, 4>>();
|
||||||
= note: required because it appears within the type `PhantomData<*const ()>`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
|
||||||
= note: required because it appears within the type `ManuallyDrop<PhantomData<*const ()>>`
|
|
|
||||||
= note: required because it appears within the type `MaybeUninit<PhantomData<*const ()>>`
|
= help: within `HistoryBuffer<PhantomData<*const ()>, 4>`, the trait `Send` is not implemented for `*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 `[MaybeUninit<PhantomData<*const ()>>; 4]`
|
||||||
= note: required because it appears within the type `HistoryBuffer<PhantomData<*const ()>, 4_usize>`
|
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`
|
||||||
|
--> ui/not-send.rs:14:8
|
||||||
|
|
|
||||||
|
12 | fn is_send<T>()
|
||||||
|
| ------- required by a bound in this function
|
||||||
|
13 | where
|
||||||
|
14 | T: Send,
|
||||||
|
| ^^^^ required by this bound in `is_send`
|
||||||
|
@ -72,7 +72,6 @@
|
|||||||
#![deny(rust_2018_compatibility)]
|
#![deny(rust_2018_compatibility)]
|
||||||
#![deny(rust_2018_idioms)]
|
#![deny(rust_2018_idioms)]
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
#![deny(const_err)]
|
|
||||||
|
|
||||||
pub use binary_heap::BinaryHeap;
|
pub use binary_heap::BinaryHeap;
|
||||||
pub use deque::Deque;
|
pub use deque::Deque;
|
||||||
|
@ -461,15 +461,6 @@ impl<'a, K, V> Clone for Iter<'a, K, V> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K, V, const N: usize> Drop for LinearMap<K, V, N> {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
// heapless::Vec implements drop right?
|
|
||||||
drop(&self.buffer);
|
|
||||||
// original code below
|
|
||||||
// unsafe { ptr::drop_in_place(self.buffer.as_mut_slice()) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct IterMut<'a, K, V> {
|
pub struct IterMut<'a, K, V> {
|
||||||
iter: slice::IterMut<'a, (K, V)>,
|
iter: slice::IterMut<'a, (K, V)>,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user