about summary refs log tree commit diff
path: root/tests/ui/sized-hierarchy/elaboration-opt-regions-1.rs
blob: d59227beae8179378decec6c17ebfc437c9bf36e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ check-pass
//@ compile-flags: --crate-type=lib
//@ revisions: old next
//@[next] compile-flags: -Znext-solver
#![feature(sized_hierarchy)]

use std::marker::{PhantomData, MetaSized, PointeeSized};

struct Foo<'a, T: PointeeSized>(*mut &'a (), T);

fn requires_metasized<'a, T: MetaSized>(f: &'a T) {}

fn foo<'a, T: PointeeSized>(f: &Foo<'a, T>)
where
    Foo<'a, T>: Sized
{
    requires_metasized(f);
}