mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
ci: deny warnings on '--cfg tokio_unstable' tests (#2859)
This commit is contained in:
parent
e7091fde78
commit
6866b24ca1
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -91,7 +91,7 @@ jobs:
|
|||||||
run: cargo test --features full
|
run: cargo test --features full
|
||||||
working-directory: tokio
|
working-directory: tokio
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: '--cfg tokio_unstable'
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
|
||||||
|
|
||||||
miri:
|
miri:
|
||||||
name: miri
|
name: miri
|
||||||
@ -156,7 +156,7 @@ jobs:
|
|||||||
- name: check --each-feature --unstable
|
- name: check --each-feature --unstable
|
||||||
run: cargo hack check --all --each-feature -Z avoid-dev-deps
|
run: cargo hack check --all --each-feature -Z avoid-dev-deps
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: --cfg tokio_unstable
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
|
||||||
|
|
||||||
minrust:
|
minrust:
|
||||||
name: minrust
|
name: minrust
|
||||||
@ -239,6 +239,6 @@ jobs:
|
|||||||
run: cargo test --lib --release --features full -- --nocapture $SCOPE
|
run: cargo test --lib --release --features full -- --nocapture $SCOPE
|
||||||
working-directory: tokio
|
working-directory: tokio
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: --cfg loom --cfg tokio_unstable
|
RUSTFLAGS: --cfg loom --cfg tokio_unstable -Dwarnings
|
||||||
LOOM_MAX_PREEMPTIONS: 2
|
LOOM_MAX_PREEMPTIONS: 2
|
||||||
SCOPE: ${{ matrix.scope }}
|
SCOPE: ${{ matrix.scope }}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::loom::sync::{Arc, Mutex};
|
use crate::loom::sync::Mutex;
|
||||||
use crate::runtime::handle::Handle;
|
use crate::runtime::handle::Handle;
|
||||||
use crate::runtime::shell::Shell;
|
use crate::runtime::shell::Shell;
|
||||||
use crate::runtime::{blocking, io, time, Callback, Runtime, Spawner};
|
use crate::runtime::{blocking, io, time, Callback, Runtime, Spawner};
|
||||||
@ -330,7 +330,7 @@ impl Builder {
|
|||||||
where
|
where
|
||||||
F: Fn() + Send + Sync + 'static,
|
F: Fn() + Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
self.before_stop = Some(Arc::new(f));
|
self.before_stop = Some(std::sync::Arc::new(f));
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ mod group_b {
|
|||||||
#[test]
|
#[test]
|
||||||
fn complete_block_on_under_load() {
|
fn complete_block_on_under_load() {
|
||||||
loom::model(|| {
|
loom::model(|| {
|
||||||
let mut pool = mk_pool(1);
|
let pool = mk_pool(1);
|
||||||
|
|
||||||
pool.block_on(async {
|
pool.block_on(async {
|
||||||
// Trigger a re-schedule
|
// Trigger a re-schedule
|
||||||
|
@ -22,12 +22,6 @@ impl Pack {
|
|||||||
Pack { mask, shift }
|
Pack { mask, shift }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Mask used to unpack value
|
|
||||||
#[cfg(all(test, loom))]
|
|
||||||
pub(crate) const fn mask(&self) -> usize {
|
|
||||||
self.mask
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Width, in bits, dedicated to storing the value.
|
/// Width, in bits, dedicated to storing the value.
|
||||||
pub(crate) const fn width(&self) -> u32 {
|
pub(crate) const fn width(&self) -> u32 {
|
||||||
pointer_width() - (self.mask >> self.shift).leading_zeros()
|
pointer_width() - (self.mask >> self.shift).leading_zeros()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user