1 // ignore-test: This now ICEs again.
5 // revisions: min_tait full_tait
6 #![feature(min_type_alias_impl_trait)]
7 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
8 //[full_tait]~^ WARN incomplete
10 use std::marker::PhantomData;
12 /* copied Index and TryFrom for convenience (and simplicity) */
15 fn my_index(self) -> Self::O;
17 trait MyFrom<T>: Sized {
19 fn my_from(value: T) -> Result<Self, Self::Error>;
22 /* MCVE starts here */
25 type DummyT<T> = impl F;
26 fn _dummy_t<T>() -> DummyT<T> {}
28 struct Phantom1<T>(PhantomData<T>);
29 struct Phantom2<T>(PhantomData<T>);
30 struct Scope<T>(Phantom2<DummyT<T>>);
38 impl<T> MyFrom<Phantom2<T>> for Phantom1<T> {
40 fn my_from(_: Phantom2<T>) -> Result<Self, Self::Error> {
45 impl<T: MyFrom<Phantom2<DummyT<U>>>, U> MyIndex<Phantom1<T>> for Scope<U> {
47 fn my_index(self) -> Self::O {
48 MyFrom::my_from(self.0).ok().unwrap()
53 let _pos: Phantom1<DummyT<()>> = Scope::new().my_index();