// run-pass // Regression test for #41677. The local variable was winding up with // a type `Receiver` where `?T` was unconstrained, because we // failed to enforce the WF obligations and `?T` is a bivariant type // parameter position. #![allow(unused_variables, dead_code)] use std::marker::PhantomData; trait Handle { type Inner; } struct ResizingHandle(PhantomData); impl Handle for ResizingHandle { type Inner = H; } struct Receiver>(PhantomData); fn channel(size: usize) -> Receiver> { let rx = Receiver(PhantomData); rx } fn main() { }