mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
19 lines
247 B
Rust
19 lines
247 B
Rust
//@ compile-flags: -Znext-solver
|
|
//@ check-pass
|
|
|
|
use std::mem::ManuallyDrop;
|
|
|
|
trait Foo {}
|
|
|
|
struct Guard<T> {
|
|
value: ManuallyDrop<T>,
|
|
}
|
|
|
|
impl<T: Foo> Guard<T> {
|
|
fn uwu(&self) {
|
|
let x: &dyn Foo = &*self.value;
|
|
}
|
|
}
|
|
|
|
fn main() {}
|