rust/tests/ui/crashes/ice-4968.rs

19 lines
313 B
Rust
Raw Normal View History

2019-12-31 00:44:04 -06:00
// 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() {}