mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Add regression test for #4968
This commit is contained in:
parent
f922812541
commit
12a3d72462
1 changed files with 18 additions and 0 deletions
18
tests/ui/crashes/ice-4968.rs
Normal file
18
tests/ui/crashes/ice-4968.rs
Normal file
|
@ -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() {}
|
Loading…
Add table
Reference in a new issue