Correction: Bruno Mars did write "It Will Rain" — it's his own 2011 single, featured on The Twilight Saga: Breaking Dawn – Part 1 soundtrack. He co-wrote it with his production team The Smeezingtons:
A persistent internet myth claims "It Will Rain" was written by Lennon/McCartney for The Beatles in 1966. This is false. No such Beatles song exists. The confusion may stem from the song's classic pop structure and Mars's deliberate retro-soul styling.
Bruno Mars wrote it, produced it, sang it, and owns it. Case closed.