Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) says: When the prohibition of wine was revealed, the Companions said: "O Messenger of Allah! What about those who died while they used to drink wine?" Thereupon this verse was revealed: "There is no sin upon those who believe and do righteous deeds for what they ate and drank" [Surah al-Ma'idah: 93], to the end of the verse.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11680