كتاب الإيمان
1  
The Book of Faith
(3)
Chapter: Asking about the pillars of Islam
(3)
باب السُّؤَالِ عَنْ أَرْكَانِ الْإِسْلَامِ
Sahih Muslim 12 b

It is narrated on the authority of Thabit that Anas said:

We were forbidden in the Holy Qur'an that we should ask about anything from the Messenger of Allah (ﷺ) and then Anas reported the hadith in similar words.
حَدَّثَنِي عَبْدُ اللَّهِ بْنُ هَاشِمٍ الْعَبْدِيُّ، حَدَّثَنَا بَهْزٌ، حَدَّثَنَا سُلَيْمَانُ بْنُ الْمُغِيرَةِ، عَنْ ثَابِتٍ، قَالَ قَالَ أَنَسٌ كُنَّا نُهِينَا فِي الْقُرْآنِ أَنْ نَسْأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ شَىْءٍ ‏.‏ وَسَاقَ الْحَدِيثَ بِمِثْلِهِ ‏.‏
Reference : Sahih Muslim 12b
In-book reference : Book 1, Hadith 11
USC-MSA web (English) reference : Book 1, Hadith 10
  (deprecated numbering scheme)