diff --git a/src/context.rs b/src/context.rs index 13ec659..8d1c459 100644 --- a/src/context.rs +++ b/src/context.rs @@ -2477,6 +2477,7 @@ impl<'a> TypleContext<'a> { let segment = path.segments.first_mut().unwrap(); *segment = ty_segment.clone(); *qself = ty_qself.clone(); + path.leading_colon = ty_path.leading_colon; } _ => { let mut segments = std::mem::take(&mut path.segments).into_iter(); diff --git a/tests/compile/mod.expanded.rs b/tests/compile/mod.expanded.rs index fa6fd59..c90fb99 100644 --- a/tests/compile/mod.expanded.rs +++ b/tests/compile/mod.expanded.rs @@ -2050,28 +2050,28 @@ pub mod typle_fold { where T0: UsefulTrait, { - type UsefulType = T0::UsefulType; + type UsefulType = ::UsefulType; } impl UsefulTrait for (T0, T1) where T0: UsefulTrait, T1: UsefulTrait, - ::UsefulType: IsUseful, + ::UsefulType: IsUseful<::UsefulType>, { - type UsefulType = <::UsefulType as IsUseful>::State; + type UsefulType = <::UsefulType as IsUseful<::UsefulType>>::State; } impl UsefulTrait for (T0, T1, T2) where T0: UsefulTrait, T1: UsefulTrait, T2: UsefulTrait, - ::UsefulType: IsUseful, + ::UsefulType: IsUseful<::UsefulType>, ::UsefulType: IsUseful< - <::UsefulType as IsUseful>::State, + <::UsefulType as IsUseful<::UsefulType>>::State, >, { type UsefulType = <::UsefulType as IsUseful< - <::UsefulType as IsUseful>::State, + <::UsefulType as IsUseful<::UsefulType>>::State, >>::State; } } diff --git a/tests/compile/typle_fold.rs b/tests/compile/typle_fold.rs index 8999f24..61c3d69 100644 --- a/tests/compile/typle_fold.rs +++ b/tests/compile/typle_fold.rs @@ -16,13 +16,13 @@ where T<_>: UsefulTrait, typle_bound!(i in 1..T::LEN => T<{i}>::UsefulType):IsUseful< typle_fold!( - T0::UsefulType; + T<0>::UsefulType; j in 1..i => |Inner| ::UsefulType as IsUseful>::State ), >, { type UsefulType = typle_fold!( - T0::UsefulType; + T<0>::UsefulType; j in 1..T::LEN => |Inner| ::UsefulType as IsUseful>::State ); }