diff --git a/ide/packages/print/src/private/argus.tsx b/ide/packages/print/src/private/argus.tsx index b404b7f..d2935d4 100644 --- a/ide/packages/print/src/private/argus.tsx +++ b/ide/packages/print/src/private/argus.tsx @@ -125,12 +125,20 @@ export const PrintWhereClause = ({ }; const PrintClauseWithBounds = ({ o }: { o: ClauseWithBounds }) => { - const [traits, lifetimes] = _.partition(o.bounds, bound => "Trait" in bound); - const traitBounds = _.map(traits, bound => ); - const lifetimeBounds = _.map(lifetimes, bound => ( + // Sort the bounds to be Ty: Fn() + Trait + Region + const sortedBounds = _.sortBy(o.bounds, bound => + "FnTrait" in bound + ? 0 + : "Trait" in bound + ? 1 + : "Region" in bound + ? 2 + : undefined + ); + + const boundComponents = _.map(sortedBounds, bound => ( )); - const boundComponents = _.concat(traitBounds, lifetimeBounds); return ( <>