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 16, 2024
1 parent 2fa8e3b commit b56cdb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ impl<'a> TypleContext<'a> {
}
},
};
let end = match range.limits {
let end = match range.limits {
RangeLimits::HalfOpen(_) => end,
RangeLimits::Closed(_) => end.saturating_add(1),
};
Expand Down Expand Up @@ -2490,6 +2490,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
6 changes: 3 additions & 3 deletions tests/compile/typle_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ pub trait UsefulTrait {
impl<T: Tuple> UsefulTrait for T
where
T<_>: UsefulTrait,
typle_bound!(i in 1.. => T<{i}>::UsefulType): IsUseful<
typle_bound!(i in 1.. => 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.. => |Inner| <T<{j}>::UsefulType as IsUseful<Inner>>::State
);

Expand Down

0 comments on commit b56cdb4

Please sign in to comment.