2024-02-01 23:48:04 +00:00
|
|
|
//@ check-pass
|
2022-11-08 22:15:02 -05:00
|
|
|
|
2024-06-20 09:20:45 +00:00
|
|
|
// We normalize and check bounds before we resolve the generics
|
2022-11-08 22:15:02 -05:00
|
|
|
// of the function (which we know because of the return type).
|
|
|
|
|
|
|
|
trait Trait<'a> {
|
|
|
|
type Out;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, T> Trait<'a> for T {
|
|
|
|
type Out = T;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn weird_bound<X>() -> X
|
2024-06-20 09:20:45 +00:00
|
|
|
where
|
|
|
|
for<'a> X: Trait<'a>,
|
|
|
|
for<'a> <X as Trait<'a>>::Out: Copy,
|
|
|
|
{
|
|
|
|
todo!()
|
|
|
|
}
|
2022-11-08 22:15:02 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: () = weird_bound();
|
|
|
|
}
|