about summary refs log tree commit diff
path: root/tests/ui/traits/next-solver/constrain-alias-goals-in-unsize.rs
blob: 1656238bd6188d92bc8fc31815ab3c4f26727759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ 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() {}