When the only checker is a knight on the 8th or 1st rank respectively, pawn captures are not considered promotions. You end up with a pawn on the 8th or 1st rank.
case make_piece(Them, KNIGHT):
//If the checker is either a pawn or a knight, the only legal moves are to capture
//the checker. Only non-pinned pieces can capture it
b1 = attackers_from<Us>(checker_square, all) & not_pinned;
while (b1) *list++ = Move(pop_lsb(&b1), checker_square, CAPTURE);
return list;
When the only checker is a knight on the 8th or 1st rank respectively, pawn captures are not considered promotions. You end up with a pawn on the 8th or 1st rank.