Hadithcore
Sahih Muslim, 2268 c
sahih

Jabir reported Allah's Messenger (ﷺ) as saying:

There came to him (the Prophet) a desert Arab and said: I saw in a dream that I had been beheaded and I had been following it (the severed head). Allah's Messenger (ﷺ) reprimanded him saying: Do not inform about the vain sporting of devil with you during the night.

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

‏ لاَ تُخْبِرْ بِتَلَعُّبِ الشَّيْطَانِ بِكَ فِي الْمَنَامِ ‏

‏ ‏.‏

References2 variants
In-Book Reference
Book 42, Hadith 29
USC-MSA web (English) reference
Book 29, Hadith 5640 (deprecated numbering scheme)