mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 18:28:40 +00:00
18 lines
313 B
Rust
18 lines
313 B
Rust
// 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() {}
|