Skip to content

Commit

Permalink
Remove unused structs
Browse files Browse the repository at this point in the history
  • Loading branch information
frengor committed Apr 25, 2024
1 parent 5bf545a commit 7641260
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/tests/weak/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,6 @@ fn test_new_cyclic() {
fn panicking_new_cyclic1() {
reset_state();

struct Cyclic {
weak: Weak<Cyclic>,
}

unsafe impl Trace for Cyclic {
fn trace(&self, ctx: &mut Context<'_>) {
self.weak.trace(ctx);
}
}

impl Finalize for Cyclic {}

let _cc = Cc::new_cyclic(|_| {
panic!("Expected panic during panicking_new_cyclic1!");
});
Expand All @@ -170,18 +158,6 @@ fn panicking_new_cyclic1() {
fn panicking_new_cyclic2() {
reset_state();

struct Cyclic {
weak: Weak<Cyclic>,
}

unsafe impl Trace for Cyclic {
fn trace(&self, ctx: &mut Context<'_>) {
self.weak.trace(ctx);
}
}

impl Finalize for Cyclic {}

let _cc = Cc::new_cyclic(|weak| {
let _weak = weak.clone();
panic!("Expected panic during panicking_new_cyclic2!");
Expand Down

0 comments on commit 7641260

Please sign in to comment.