Skip to content

Commit

Permalink
Revert "Temporarily disable ref_wake_same test"
Browse files Browse the repository at this point in the history
This reverts commit 42c2ab0.
  • Loading branch information
taiki-e committed Sep 15, 2024
1 parent 4befac9 commit 0cb6d5a
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions futures/tests/task_arc_wake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@ fn create_from_arc() {
assert_eq!(1, Arc::strong_count(&some_w));
}

// TODO: rustc regression: https://github.com/rust-lang/rust/issues/121600
// #[test]
// fn ref_wake_same() {
// let some_w = Arc::new(CountingWaker::new());
//
// let w1: Waker = task::waker(some_w.clone());
// let w2 = task::waker_ref(&some_w);
// let w3 = w2.clone();
//
// assert!(w1.will_wake(&w2));
// assert!(w2.will_wake(&w3));
// }
#[test]
fn ref_wake_same() {
let some_w = Arc::new(CountingWaker::new());

let w1: Waker = task::waker(some_w.clone());
let w2 = task::waker_ref(&some_w);
let w3 = w2.clone();

assert!(w1.will_wake(&w2));
assert!(w2.will_wake(&w3));
}

#[test]
fn proper_refcount_on_wake_panic() {
Expand Down

0 comments on commit 0cb6d5a

Please sign in to comment.