Sunan Abi Dawud, Book 1, Hadith 26 (Abu Dawud 26)

Narrated Mu'adh ibn Jabal:

The Messenger of Allah (ﷺ) said: Be on your guard against three things which provoke cursing: easing in the watering places and on the thoroughfares, and in the shade (of the tree).