mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
chore: fix latest rust-1.78.0 warnings (#6528)
This commit is contained in:
+13
-13
@@ -67,7 +67,7 @@ jobs:
|
|||||||
- x86_64-fortanix-unknown-sgx
|
- x86_64-fortanix-unknown-sgx
|
||||||
- check-redox
|
- check-redox
|
||||||
- wasm32-unknown-unknown
|
- wasm32-unknown-unknown
|
||||||
- wasm32-wasi
|
- wasm32-wasip1
|
||||||
- check-external-types
|
- check-external-types
|
||||||
- check-fuzzing
|
- check-fuzzing
|
||||||
- check-unstable-mt-counters
|
- check-unstable-mt-counters
|
||||||
@@ -908,15 +908,15 @@ jobs:
|
|||||||
run: wasm-pack test --node -- --features "macros sync"
|
run: wasm-pack test --node -- --features "macros sync"
|
||||||
working-directory: tokio
|
working-directory: tokio
|
||||||
|
|
||||||
wasm32-wasi:
|
wasm32-wasip1:
|
||||||
name: ${{ matrix.target }}
|
name: ${{ matrix.target }}
|
||||||
needs: basics
|
needs: basics
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
- wasm32-wasi
|
- wasm32-wasip1
|
||||||
- wasm32-wasi-preview1-threads
|
- wasm32-wasip1-threads
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust ${{ env.rust_stable }}
|
- name: Install Rust ${{ env.rust_stable }}
|
||||||
@@ -935,36 +935,36 @@ jobs:
|
|||||||
- name: WASI test tokio full
|
- name: WASI test tokio full
|
||||||
run: cargo test -p tokio --target ${{ matrix.target }} --features full
|
run: cargo test -p tokio --target ${{ matrix.target }} --features full
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_WASM32_WASI_RUNNER: "wasmtime run --"
|
CARGO_TARGET_WASM32_WASIP1_RUNNER: "wasmtime run --"
|
||||||
CARGO_TARGET_WASM32_WASI_PREVIEW1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
||||||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
||||||
|
|
||||||
- name: WASI test tokio-util full
|
- name: WASI test tokio-util full
|
||||||
run: cargo test -p tokio-util --target ${{ matrix.target }} --features full
|
run: cargo test -p tokio-util --target ${{ matrix.target }} --features full
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_WASM32_WASI_RUNNER: "wasmtime run --"
|
CARGO_TARGET_WASM32_WASIP1_RUNNER: "wasmtime run --"
|
||||||
CARGO_TARGET_WASM32_WASI_PREVIEW1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
||||||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
||||||
|
|
||||||
- name: WASI test tokio-stream
|
- name: WASI test tokio-stream
|
||||||
run: cargo test -p tokio-stream --target ${{ matrix.target }} --features time,net,io-util,sync
|
run: cargo test -p tokio-stream --target ${{ matrix.target }} --features time,net,io-util,sync
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_WASM32_WASI_RUNNER: "wasmtime run --"
|
CARGO_TARGET_WASM32_WASIP1_RUNNER: "wasmtime run --"
|
||||||
CARGO_TARGET_WASM32_WASI_PREVIEW1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
||||||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
||||||
|
|
||||||
- name: test tests-integration --features wasi-rt
|
- name: test tests-integration --features wasi-rt
|
||||||
# TODO: this should become: `cargo hack wasi test --each-feature`
|
# TODO: this should become: `cargo hack wasi test --each-feature`
|
||||||
run: cargo wasi test --test rt_yield --features wasi-rt
|
run: cargo wasi test --test rt_yield --features wasi-rt
|
||||||
if: matrix.target == 'wasm32-wasi'
|
if: matrix.target == 'wasm32-wasip1'
|
||||||
working-directory: tests-integration
|
working-directory: tests-integration
|
||||||
|
|
||||||
- name: test tests-integration --features wasi-threads-rt
|
- name: test tests-integration --features wasi-threads-rt
|
||||||
run: cargo test --target ${{ matrix.target }} --features wasi-threads-rt
|
run: cargo test --target ${{ matrix.target }} --features wasi-threads-rt
|
||||||
if: matrix.target == 'wasm32-wasi-preview1-threads'
|
if: matrix.target == 'wasm32-wasip1-threads'
|
||||||
working-directory: tests-integration
|
working-directory: tests-integration
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_WASM32_WASI_PREVIEW1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
|
||||||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
|
||||||
|
|
||||||
check-external-types:
|
check-external-types:
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use std::process::ExitStatus;
|
|||||||
/// An interface for waiting on a process to exit.
|
/// An interface for waiting on a process to exit.
|
||||||
pub(crate) trait Wait {
|
pub(crate) trait Wait {
|
||||||
/// Get the identifier for this process or diagnostics.
|
/// Get the identifier for this process or diagnostics.
|
||||||
|
#[allow(dead_code)]
|
||||||
fn id(&self) -> u32;
|
fn id(&self) -> u32;
|
||||||
/// Try waiting for a process to exit in a non-blocking manner.
|
/// Try waiting for a process to exit in a non-blocking manner.
|
||||||
fn try_wait(&mut self) -> io::Result<Option<ExitStatus>>;
|
fn try_wait(&mut self) -> io::Result<Option<ExitStatus>>;
|
||||||
|
|||||||
@@ -450,6 +450,7 @@ impl Launch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn run(worker: Arc<Worker>) {
|
fn run(worker: Arc<Worker>) {
|
||||||
|
#[allow(dead_code)]
|
||||||
struct AbortOnPanic;
|
struct AbortOnPanic;
|
||||||
|
|
||||||
impl Drop for AbortOnPanic {
|
impl Drop for AbortOnPanic {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/// Marker for types that are `Sync` but not `Send`
|
/// Marker for types that are `Sync` but not `Send`
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) struct SyncNotSend(#[allow(dead_code)] *mut ());
|
pub(crate) struct SyncNotSend(#[allow(dead_code)] *mut ());
|
||||||
|
|
||||||
unsafe impl Sync for SyncNotSend {}
|
unsafe impl Sync for SyncNotSend {}
|
||||||
|
|||||||
Reference in New Issue
Block a user