Skip to content

Commit

Permalink
tests: Remove needless casts
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Apr 11, 2024
1 parent 3954822 commit ad70eb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/pin_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ fn dst() {
}

let mut x = Struct1 { f: 0_u8 };
let x: Pin<&mut Struct1<dyn core::fmt::Debug>> = Pin::new(&mut x as _);
let x: Pin<&mut Struct1<dyn core::fmt::Debug>> = Pin::new(&mut x);
let _: &mut (dyn core::fmt::Debug) = x.project().f;

#[pin_project]
Expand All @@ -559,7 +559,7 @@ fn dst() {
}

let mut x = Struct2 { f: 0_u8 };
let x: Pin<&mut Struct2<dyn core::fmt::Debug + Unpin>> = Pin::new(&mut x as _);
let x: Pin<&mut Struct2<dyn core::fmt::Debug + Unpin>> = Pin::new(&mut x);
let _: Pin<&mut (dyn core::fmt::Debug + Unpin)> = x.project().f;

#[allow(explicit_outlives_requirements)] // https://github.com/rust-lang/rust/issues/60993
Expand Down

0 comments on commit ad70eb8

Please sign in to comment.