Skip to content

Commit

Permalink
Add missing double colon
Browse files Browse the repository at this point in the history
  • Loading branch information
jongiddy committed Apr 17, 2024
1 parent 5aba155 commit 58161b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions tests/compile/mod.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2050,28 +2050,28 @@ pub mod typle_fold {
where
T0: UsefulTrait,
{
type UsefulType = T0::UsefulType;
type UsefulType = <T0>::UsefulType;
}
impl<T0, T1> UsefulTrait for (T0, T1)
where
T0: UsefulTrait,
T1: UsefulTrait,
<T1>::UsefulType: IsUseful<T0::UsefulType>,
<T1>::UsefulType: IsUseful<<T0>::UsefulType>,
{
type UsefulType = <<T1>::UsefulType as IsUseful<T0::UsefulType>>::State;
type UsefulType = <<T1>::UsefulType as IsUseful<<T0>::UsefulType>>::State;
}
impl<T0, T1, T2> UsefulTrait for (T0, T1, T2)
where
T0: UsefulTrait,
T1: UsefulTrait,
T2: UsefulTrait,
<T1>::UsefulType: IsUseful<T0::UsefulType>,
<T1>::UsefulType: IsUseful<<T0>::UsefulType>,
<T2>::UsefulType: IsUseful<
<<T1>::UsefulType as IsUseful<T0::UsefulType>>::State,
<<T1>::UsefulType as IsUseful<<T0>::UsefulType>>::State,
>,
{
type UsefulType = <<T2>::UsefulType as IsUseful<
<<T1>::UsefulType as IsUseful<T0::UsefulType>>::State,
<<T1>::UsefulType as IsUseful<<T0>::UsefulType>>::State,
>>::State;
}
}
4 changes: 2 additions & 2 deletions tests/compile/typle_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| <T<{j}>::UsefulType as IsUseful<Inner>>::State
),
>,
{
type UsefulType = typle_fold!(
T0::UsefulType;
T<0>::UsefulType;
j in 1..T::LEN => |Inner| <T<{j}>::UsefulType as IsUseful<Inner>>::State
);
}

0 comments on commit 58161b4

Please sign in to comment.