Skip to content

Commit

Permalink
Add regression test for #4968
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Dec 31, 2019
1 parent bea25c8 commit 24c6d48
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/ui/crashes/ice-4968.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// check-pass

// Test for https://github.com/rust-lang/rust-clippy/issues/4968

trait Trait {
type Assoc;
}

use std::mem::{self, ManuallyDrop};

#[allow(unused)]
fn func<T: Trait>(slice: Vec<T::Assoc>) {
unsafe {
let _: Vec<ManuallyDrop<T::Assoc>> = mem::transmute(slice);
}
}

fn main() {}

0 comments on commit 24c6d48

Please sign in to comment.