blob: 8a8f7b933b53971788bdcc424527550dbbaec438 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
// Exercises change in <https://github.com/rust-lang/rust/pull/138176>.
trait Trait<T>: Sized {}
impl<T> Trait<T> for T {}
fn is_sized<T: Sized>() {}
fn normal_ref<'a, 'b, T>()
where
&'a u32: Trait<T>,
{
is_sized::<&'b u32>();
}
struct MyRef<'a, U: ?Sized = ()>(&'a u32, U);
fn my_ref<'a, 'b, T>()
where
MyRef<'a>: Trait<T>,
{
is_sized::<MyRef<'b>>();
}
fn main() {}
|