كتاب الصيام
13  
The Book of Fasting
(17)
Chapter: The choice between fasting and not fasting when travelling
(17)
باب التَّخْيِيرِ فِي الصَّوْمِ وَالْفِطْرِ فِي السَّفَرِ ‏‏
Sahih Muslim 1122 a

Abu Darda' (Allah be pleased with him) reported:

We set out during the month of Ramadan with the Messenger of Allah (ﷺ) in such an intense heat that one of us would place his hand over his head (in order to protect himself) against the excessive heat, and none among us was observing the fast, except the Messenger of Allah (ﷺ) and 'Abdullah b. Rawaha.
حَدَّثَنَا دَاوُدُ بْنُ رُشَيْدٍ، حَدَّثَنَا الْوَلِيدُ بْنُ مُسْلِمٍ، عَنْ سَعِيدِ بْنِ عَبْدِ الْعَزِيزِ، عَنْ إِسْمَاعِيلَ، بْنِ عُبَيْدِ اللَّهِ عَنْ أُمِّ الدَّرْدَاءِ، عَنْ أَبِي الدَّرْدَاءِ، - رضى الله عنه - قَالَ خَرَجْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي شَهْرِ رَمَضَانَ فِي حَرٍّ شَدِيدٍ حَتَّى إِنْ كَانَ أَحَدُنَا لَيَضَعُ يَدَهُ عَلَى رَأْسِهِ مِنْ شِدَّةِ الْحَرِّ وَمَا فِينَا صَائِمٌ إِلاَّ رَسُولُ اللَّهِ صلى الله عليه وسلم وَعَبْدُ اللَّهِ بْنُ رَوَاحَةَ ‏.‏
Reference : Sahih Muslim 1122a
In-book reference : Book 13, Hadith 136
USC-MSA web (English) reference : Book 6, Hadith 2492
  (deprecated numbering scheme)