Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant import #80

Merged
merged 1 commit into from Mar 3, 2024
Merged

Remove redundant import #80

merged 1 commit into from Mar 3, 2024

Conversation

taiki-e
Copy link
Collaborator

@taiki-e taiki-e commented Mar 3, 2024

error: the item `Future` is imported redundantly
  --> tests/rwlock.rs:11:5
   |
9  | use futures_lite::prelude::*;
   |     ------------------------ the item `Future` is already imported here
10 | #[cfg(not(target_family = "wasm"))]
11 | use std::future::Future;
   |     ^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`

```
error: the item `Future` is imported redundantly
  --> tests/rwlock.rs:11:5
   |
9  | use futures_lite::prelude::*;
   |     ------------------------ the item `Future` is already imported here
10 | #[cfg(not(target_family = "wasm"))]
11 | use std::future::Future;
   |     ^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`
```
@taiki-e
Copy link
Collaborator Author

taiki-e commented Mar 3, 2024

Oh, miri reports deadlock...

https://github.com/smol-rs/async-lock/actions/runs/8130186743/job/22218147586?pr=80

error: deadlock: the evaluated program deadlocked
  --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/futex.rs:70:21
   |
70 |                     )
   |                     ^ the evaluated program deadlocked
   |
   = note: inside `std::sys::pal::unix::futex::futex_wait` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/futex.rs:70:21: 70:22
   = note: inside `std::sys::locks::condvar::futex::Condvar::wait_optional_timeout` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/locks/condvar/futex.rs:49:17: 49:62
   = note: inside `std::sys::locks::condvar::futex::Condvar::wait` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/locks/condvar/futex.rs:33:9: 33:48
   = note: inside `std::sync::Condvar::wait::<()>` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/condvar.rs:189:13: 189:34
   = note: inside `parking::Inner::park` at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking-2.2.0/src/lib.rs:366:25: 366:42
   = note: inside `parking::Parker::park` at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking-2.2.0/src/lib.rs:121:9: 121:39
   = note: inside closure at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.2.0/src/future.rs:101:34: 101:47
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<(parking::Parker, std::task::Waker)>>::try_with::<{closure@futures_lite::future::block_on<(), {async block@tests/barrier.rs:22:38: 25:22}>::{closure#0}}, ()>` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:284:16: 284:31
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<(parking::Parker, std::task::Waker)>>::with::<{closure@futures_lite::future::block_on<(), {async block@tests/barrier.rs:22:38: 25:22}>::{closure#0}}, ()>` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:2[60](https://github.com/smol-rs/async-lock/actions/runs/8130186743/job/22218147586?pr=80#step:4:61):9: 260:25
   = note: inside `futures_lite::future::block_on::<(), {async block@tests/barrier.rs:22:38: 25:22}>` at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.2.0/src/future.rs:78:5: 104:7
note: inside closure
  --> tests/barrier.rs:22:21
   |
22 | /                     future::block_on(async move {
23 | |                         let res = c.wait().await;
24 | |                         tx.send(res.is_leader()).await.unwrap();
25 | |                     })
   | |______________________^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error

@Jules-Bertholet Jules-Bertholet merged commit aeb9d8f into master Mar 3, 2024
8 of 9 checks passed
@Jules-Bertholet Jules-Bertholet deleted the taiki-e/ci branch March 3, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants