Hadithcore
Sahih Muslim, 926 c
sahih

A hadith like this is narrated with the same chain of transmitters but with the addition of these words:

" The Messenger of Allah (ﷺ) happened to pass by a woman (who was sitting) by the side of a grave."

وَحَدَّثَنَاهُ يَحْيَى بْنُ حَبِيبٍ الْحَارِثِيُّ، حَدَّثَنَا خَالِدٌ يَعْنِي ابْنَ الْحَارِثِ، ح وَحَدَّثَنَا عُقْبَةُ بْنُ مُكْرَمٍ الْعَمِّيُّ، حَدَّثَنَا عَبْدُ الْمَلِكِ بْنُ عَمْرٍو، ح وَحَدَّثَنِي أَحْمَدُ بْنُ إِبْرَاهِيمَ الدَّوْرَقِيُّ، حَدَّثَنَا عَبْدُ الصَّمَدِ، قَالُوا جَمِيعًا حَدَّثَنَا شُعْبَةُ، بِهَذَا الإِسْنَادِ نَحْوَ حَدِيثِ عُثْمَانَ بْنِ عُمَرَ بِقِصَّتِهِ ‏.‏ وَفِي حَدِيثِ عَبْدِ الصَّمَدِ مَرَّ النَّبِيُّ صلى الله عليه وسلم بِامْرَأَةٍ عِنْدَ قَبْرٍ ‏.‏

References2 variants
In-Book Reference
Book 11, Hadith 19
USC-MSA web (English) reference
Book 4, Hadith 2014 (deprecated numbering scheme)