mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-16 00:00:12 +02:00
sync: make const_new methods always available (#5885)
Since MSRV is bumped to 1.63, `Mutex::new` is now usable in const context. Also use `assert!` in const function to ensure correctness instead of silently truncating the value and remove cfg `tokio_no_const_mutex_new`. Signed-off-by: Jiahao XU <[email protected]>
This commit is contained in:
@@ -442,7 +442,6 @@ jobs:
|
||||
|
||||
# Run a platform without AtomicU64 and no const Mutex::new
|
||||
- target: armv5te-unknown-linux-gnueabi
|
||||
rustflags: --cfg tokio_no_const_mutex_new
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Rust stable
|
||||
@@ -485,7 +484,6 @@ jobs:
|
||||
|
||||
# Run a platform without AtomicU64 and no const Mutex::new
|
||||
- target: armv5te-unknown-linux-gnueabi
|
||||
rustflags: --cfg tokio_no_const_mutex_new
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Rust stable
|
||||
@@ -568,10 +566,6 @@ jobs:
|
||||
|
||||
# https://github.com/tokio-rs/tokio/pull/5356
|
||||
# https://github.com/tokio-rs/tokio/issues/5373
|
||||
- name: Check without const_mutex_new
|
||||
run: cargo hack check -p tokio --feature-powerset --depth 2 --keep-going
|
||||
env:
|
||||
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_atomic_u64 --cfg tokio_no_const_mutex_new
|
||||
- name: Check with const_mutex_new
|
||||
run: cargo hack check -p tokio --feature-powerset --depth 2 --keep-going
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user