Language:
كتاب الصلاة
8
Prayers (Salat)
(72)
Chapter: Sweeping (cleaning) of the mosque and removing rags, dirt and sticks from it
(72)
باب كَنْسِ الْمَسْجِدِ وَالْتِقَاطِ الْخِرَقِ وَالْقَذَى وَالْعِيدَانِ
Sahih al-Bukhari 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."

حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، قَالَ حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ ثَابِتٍ، عَنْ أَبِي رَافِعٍ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَجُلاً، أَسْوَدَ ـ أَوِ امْرَأَةً سَوْدَاءَ ـ كَانَ يَقُمُّ الْمَسْجِدَ، فَمَاتَ، فَسَأَلَ النَّبِيُّ صلى الله عليه وسلم عَنْهُ فَقَالُوا مَاتَ‏.‏ قَالَ ‏ "‏ أَفَلاَ كُنْتُمْ آذَنْتُمُونِي بِهِ دُلُّونِي عَلَى قَبْرِهِ ‏"‏‏.‏ ـ أَوْ قَالَ قَبْرِهَا ـ فَأَتَى قَبْرَهُ فَصَلَّى عَلَيْهِ‏.‏
Reference : Sahih al-Bukhari 458
In-book reference : Book 8, Hadith 106
USC-MSA web (English) reference : Vol. 1, Book 8, Hadith 448
  (deprecated numbering scheme)