TT #7 · Parshas Tazria · Aliyah 1 · Passuk 2
English: Speak to the Israelite people thus: When a woman at childbirth bears a male, she shall be impure seven days; she shall be impure as at the time of her condition of menstrual separation.
Chabad.org — Chumash, English translation + Rashi for Vayikra 12:2
Torah Temimah cites Niddah 24b.
English: A woman who gives birth to a body whose form is not articulated, or a head whose form is not articulated, might have been thought to acquire childbirth impurity. Scripture teaches: “If a woman conceives and gives birth to a male … and on the eighth day he shall be circumcised” — one fit for the covenant of eight days is included; these are excluded because they are not fit for that covenant.
Exclusion by analogy
The juxtaposition of childbirth impurity and circumcision limits the rule to a birth whose product is fit for the covenant of the eighth day.