Skip to content

Commit 30d7326

Browse files
committed
RequirementMachine: Simplify desugarSameShapeRequirement()
1 parent cd8858c commit 30d7326

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/AST/RequirementMachine/RequirementLowering.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,7 @@ static void desugarConformanceRequirement(Requirement req,
362362
desugarRequirement(subReq, loc, result, errors);
363363
}
364364

365-
/// Desugar same-shape requirements by equating the shapes of the
366-
/// root pack types, and diagnose shape requirements on non-pack
367-
/// types.
365+
/// Diagnose shape requirements on non-pack types.
368366
static void desugarSameShapeRequirement(Requirement req, SourceLoc loc,
369367
SmallVectorImpl<Requirement> &result,
370368
SmallVectorImpl<RequirementError> &errors) {
@@ -376,8 +374,7 @@ static void desugarSameShapeRequirement(Requirement req, SourceLoc loc,
376374
}
377375

378376
result.emplace_back(RequirementKind::SameShape,
379-
req.getFirstType()->getRootGenericParam(),
380-
req.getSecondType()->getRootGenericParam());
377+
req.getFirstType(), req.getSecondType());
381378
}
382379

383380
/// Convert a requirement where the subject type might not be a type parameter,

0 commit comments

Comments
 (0)