I heard the Messenger of Allah ﷺ say, "Whoever performs ablution for prayer and does so thoroughly, then walks to the prescribed prayer and prays it with the people, or with the congregation, or in the mosque, Allah will forgive him his sins."
سمعت رسول الله ﷺ يقول: من توضأ للصلاة فأسبغ الوضوء، ثم مشى إلى الصلاة المكتوبة، فصلاها مع الناس، أو مع الجماعة، أو في المسجد غفر الله له ذنوبه.
Muslim narrated it in "Purification" (232:13) through several routes, from Abdullah bin Wahb, from Amr bin Harith, that Hakam bin Abdullah Qurashi told him, that Nafi bin Jubayr and Abdullah bin Abu Salama told him, that Muaz bin Abdul-Rahman told them both, from Humran, the freed slave of Uthman bin Affan, from Uthman, and he related it.Muslim alone transmitted it with this wording, and the hadith of Uthman has already been mentioned in "Purification."