mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +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() {}
|