Leaf Guard is a Pokémon ability introduced in the fourth generation. It prevents status conditions in the sun.
During harsh sunlight, Pokémon with Leaf Guard cannot be afflicted with any status conditions. If a Pokémon is drowsy from Yawn and then the sun comes out, the ability activates and keeps the Pokémon awake. In the fourth generation, it didn't block sleep from Rest but, this was fixed in the fifth generation. To ability does not cure status conditions though.