Say I have a hand like follows: Estate, Upgrade, Upgrade, Estate, Copper. 1 card in Draw pile.
I play Upgrade (+1 card, +1 action) -> Draw the last card from my Draw pile -> Trash Estate from my hand and gain a Silver card. This silver card goes into discard. So far so good.
Now, I play my second Upgrade. Since there's no card in my Draw pile, I need to shuffle my Discard pile. Do I shuffle my silver card that I just gained or does do I leave it in the "discard-of-the-current-turn" pile.
The general question is, if I need to shuffle my discard, do I shuffle all cards that I gained during the current turn? I know that I do not shuffle cards that I have set aside.