Abu Huraira reported Allah's Messenger (ﷺ) as saying:
The vision of a Muslim which he sees or which is shown to him, and in the hadith transmitted on the authority of Ibn Mushir (the words are): "The pious dream is the forty-sixth part of Prophecy."
Reference: Sahih Muslim 2263 f
In-book reference: Book 42, Hadith 16
USC-MSA web (English) reference(deprecated numbering scheme): Book 29, Hadith 5628