2 // Regression test for #41677. The local variable was winding up with
3 // a type `Receiver<?T, H>` where `?T` was unconstrained, because we
4 // failed to enforce the WF obligations and `?T` is a bivariant type
7 #![allow(unused_variables, dead_code)]
9 use std::marker::PhantomData;
15 struct ResizingHandle<H>(PhantomData<H>);
16 impl<H> Handle for ResizingHandle<H> {
20 struct Receiver<T, H: Handle<Inner=T>>(PhantomData<H>);
22 fn channel<T>(size: usize) -> Receiver<T, ResizingHandle<T>> {
23 let rx = Receiver(PhantomData);