Painting a car flat black?

Primer draws water in. Which over time leads to oxidation/rust. I painted my car with flat black primer but the car had lots of miles and I knew I wasn’t keeping it for more then 2 years at the time.