Sahih al-Bukhari, Hadith 458

Narrated Abu Huraira: A black man or a black woman used to sweep the mosque and he or she died. The Prophet asked about her (or him). He was told that she (or he) had died. He said, "Why did you not inform me? Show me his grave (or her grave)." So he went to her (his) grave and offered her (his) funeral prayer."

حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، قَالَ حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ ثَابِتٍ، عَنْ أَبِي رَافِعٍ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَجُلاً، أَسْوَدَ ـ أَوِ امْرَأَةً سَوْدَاءَ ـ كَانَ يَقُمُّ الْمَسْجِدَ، فَمَاتَ، فَسَأَلَ النَّبِيُّ صلى الله عليه وسلم عَنْهُ فَقَالُوا مَاتَ‏.‏ قَالَ ‏ "‏ أَفَلاَ كُنْتُمْ آذَنْتُمُونِي بِهِ دُلُّونِي عَلَى قَبْرِهِ ‏" ‏‏.‏ ـ أَوْ قَالَ قَبْرِهَا ـ فَأَتَى قَبْرَهُ فَصَلَّى عَلَيْهِ‏.‏

sunnah.com