It's been a progression to nondischargeability over a few decades.

- 1978: Student debt first made nondischargeable, for loans less than five years old at time of filing: https://www.govinfo.gov/content/pkg/STATUTE-92/pdf/STATUTE-9...

§ 523. Exceptions to discharge
(a) A discharge under section 727, 1141, or 1328(b) of this title
does not discharge an individual debtor from any debt—
(8) to a governmental unit, or a nonprofit institution of higher
education, for an educational loan, unless—
(A) such loan first became due before five years before
the date of the filing of the petition; or
(B) excepting such debt from discharge under this paragraph will
impose an undue hardship on the debtor and the debtor's dependents; or

- 1990: nondischargeability waiting period was later extended to seven years: https://www.govinfo.gov/content/pkg/STATUTE-104/pdf/STATUTE-...

§ 3621.
Section 523(a)(8) of title 11, United States Code, is amended—
(1) by striking "for an educational" and all that follows
through "unless", and inserting the following: "for an educational
benefit overpayment or loan made, insured or guaranteed
by a governmental unit, or made under any program
funded in whole or in part by a governmental unit or nonprofit
institution, or for an obligation to repay funds received as an
educational benefit, scholarship or stipend, unless"; end
(2) by amending subparagraph (A) to read as follows:
"(A) such loan, benefit, scholarship, or stipend overpayment
first became due more than 7 years (exclusive of any applicable
suspension of the repayment period) before the
date of the filing of the petition; or".

- 1998: waiting period removed completely, making government-insured student loans nondischargeable: https://www.govinfo.gov/content/pkg/PLAW-105publ244/pdf/PLAW...

§ 971. NONDISCHARGEABILITY OF CERTAIN CLAIMS FOR EDUCATIONAL
BENEFITS PROVIDED TO OBTAIN HIGHER EDUCATION.
(a) AMENDMENT.—Section 523(a)(8) of title 11, United States
Code, is amended by striking "unless—" and all that follows through
"(B) excepting such debt" and inserting "unless excepting such debt".

- 2005: Nondischargeability expanded to include private student loans as well: https://www.govinfo.gov/content/pkg/PLAW-109publ8/pdf/PLAW-1...

§ 220. NONDISCHARGEABILITY OF CERTAIN EDUCATIONAL BENEFITS AND LOANS.
Section 523(a) of title 11, United States Code, is amended
by striking paragraph (8) and inserting the following:
"(8) unless excepting such debt from discharge under this
paragraph would impose an undue hardship on the debtor
and the debtor's dependents, for—
"(A)(i) an educational benefit overpayment or loan made, insured,
or guaranteed by a governmental unit, or made under any program
funded in whole or in part by a governmental unit
or nonprofit institution; or
"(ii) an obligation to repay funds received as an educational
benefit, scholarship, or stipend; or
"(B) any other educational loan that is a qualified education
loan, as defined in section 221(d)(1) of the Internal Revenue
Code of 1986, incurred by a debtor who is an individual;".

- …and, because I was curious what counts as "qualified": https://www.govinfo.gov/content/pkg/USCODE-2009-title26/pdf/...

(1) Qualified education loan
The term "qualified education loan" means any indebtedness
incurred by the taxpayer solely to pay qualified
higher education expenses—
(A) which are incurred on behalf of the taxpayer,
the taxpayer’s spouse, or any dependent of the taxpayer
as of the time the indebtedness was incurred,
(B) which are paid or incurred within a reasonable period
of time before or after the indebtedness is incurred, and
(C) which are attributable to education furnished during
a period during which the recipient was an eligible student.

Such term includes indebtedness used to refinance indebtedness
which qualifies as a qualified education loan.
The term "qualified education loan" shall not include any
indebtedness owed to a person who is related (within the
meaning of section 267(b) or 707(b)(1)) to the taxpayer
or to any person by reason of a loan under any qualified
employer plan (as de-fined in section 72(p)(4))
or under any contract referred to in section 72(p)(5).