Yurgon is correct. Almost all military aircraft have RWRs that detect radar illuminating the aircraft, like you said.
But the A10 has another system that is unique to it: the MWS (Missile Warning System) which detects ALL missile launches. Air-to-Air Missiles, TOWs being fired on the ground, and IR guided MANPADS, and so on.
If someone launches a missile, whether or not it's directed at you, your MWS will light up