"WD" actually stands for "Water Disperser" to move oxidizing oxygen and water away from anything containing iron that could lead to rust formation.
While I have used "regular" thin/runny WD-40 over the decades to remove/treat surface rust on guns after cleaning with Hoppes #9 solvent, the "regular" WD-40 is no match for salt spray corrosive conditions where I live and shoot now at the coast where even stainless steel gun parts rust.
The "Specialist Long-Term Corrosion Inhibitor" version of WD-40 is thicker and clings to metal surface and I spray liberally after cleaning with Hoppes #9 solvent and wipe off excess and gun parts stay rust-free, even when used in the fog/mist of salty ocean air like for the extended 10,000+ round testing of 10/22 and T/CR22 -
https://www.thehighroad.org/index.p...22-collector-3-break-in.859106/#post-11296626
Not a single one of my gun parts have rusted since I started using WD-40 Specialist (Long-Term Corrosion Inhibitor version as I also have silicone based Specialist).