  The evolution of accreting X-ray binary systems is closely coupled to the
properties of their donor stars. As a result, we can constrain the evolutionary
track a system is by establishing the nature of its donor. Here, we present
far-UV spectroscopy of the transient neutron-star low-mass X-ray binary Swift
J1858 in three different accretion states (low-hard, high-hard and soft). All
of these spectra exhibit anomalous N\,{\sc v}, C\,{\sc iv}, Si\,{\sc iv} and
He\,{\sc ii} lines, suggesting that its donor star has undergone CNO
processing. We also determine the donor's effective temperature, $T_{d} \simeq
5700$~K, and radius, $R_d \simeq 1.7~R_{\odot}$, based on photometric
observations obtained during quiescence. Lastly, we leverage the transient
nature of the system to set an upper limit of $\dot{M}_{\rm acc} \lesssim
10^{-8.5}~M_{\odot}~yr^{-1}$ on the present-day mass-transfer rate. Combining
all these with the orbital period of the system, $P_{\rm orb} = 21.3$~hrs, we
search for viable evolution paths. The initial donor masses in the allowed
solutions span the range $1~M_{\odot} \lesssim M_{d,i} \lesssim 3.5~M_{\odot}$.
All but the lowest masses in this range are consistent with the strong
CNO-processing signature in the UV line ratios. The present-day donor mass in
the permitted tracks are $0.5~M_{\odot}\lesssim M_{d,obs} \lesssim
1.3~M_{\odot}$, higher than suggested by recent eclipse modelling. Since
$P_{\rm orb}$ is close to the so-called bifurcation period, both converging and
diverging binary tracks are permitted. If Swift J1858 is on a converging track,
it will end its life as an ultra-compact system with a sub-stellar donor star.
