Reference for Shabbat 22:4
נוֹתְנִין תַּבְשִׁיל לְתוֹךְ הַבּוֹר בִּשְׁבִיל שֶׁיְּהֵא שָׁמוּר, וְאֶת הַמַּיִם הַיָּפִים בָּרָעִים בִּשְׁבִיל שֶׁיִּצַּנּוּ, וְאֶת הַצּוֹנֵן בַּחַמָּה בִּשְׁבִיל שֶׁיֵּחַמּוּ. מִי שֶׁנָּשְׁרוּ כֵלָיו בַּדֶּרֶךְ בְּמַיִם, מְהַלֵּךְ בָּהֶן וְאֵינוֹ חוֹשֵׁשׁ. הִגִּיעַ לֶחָצֵר הַחִיצוֹנָה, שׁוֹטְחָן בַּחַמָּה, אֲבָל לֹא כְנֶגֶד הָעָם:
It is permitted to place a dish in a hole [where there is no water] so that it be preserved [i.e., so that it not become spoiled by the heat. We are hereby apprised that we do not fear that he might dig holes in the ground so that the pot can rest evenly], and (it is permitted to place a container of) good [i.e., drinkable] water into bad water to cool it off. [i.e., It is permitted to place it into a mikveh of bad, undrinkable water. (Although this is obvious, it is stated here because of what follows, viz.:)] And (it is permitted to place) cold water in the sun to become warm. [I might think that this should be forbidden — a decree, lest he come to place it in hot ashes; we are, therefore, apprised otherwise.] If one's garments fell into water while he was on the road (on Shabbath), he may continue walking in them and not fear [that people will suspect him of having washed them.] When he reaches the outer courtyard [near the entrance of the city, a guarded place], he may spread them out in the sun [to dry], but not before the people, [for they will suspect him of having washed them. (This Mishnah is rejected, because it is an acknowledged halachah with us that "everything the sages forbade because of 'appearance' is forbidden even in the inner sanctum" Therefore, it is forbidden to spread them out, even not before the people)].