Some of the companions of the Prophet ﷺ died while they were still drinking wine. When its prohibition was revealed, some of the companions of the Prophet ﷺ asked, "What about our companions who died while drinking it?" Then the verse was revealed, "There is no blame upon those who believe and do righteous deeds for what they have consumed" [Maidah 5:93].
حدثنا بذلك بندار حدثنا محمد بن جعفر حدثنا شعبة عن أبي إسحق قال
مات ناس من أصحاب النبي ﷺ وهم يشربون الخمر فلما نزل تحريمها قال ناس من أصحاب النبي ﷺ فكيف بأصحابنا الذين ماتوا وهم يشربونها فنزلت {ليس على الذين آمنوا وعملوا الصالحات جناح فيما طعموا} الآية