If the player has two cards in the discards and no cards in their hand, they can do a long rest. The next turn, however, after the long rest, they will be exhausted. See the FAQ:
The FAQ wrote:
If I have zero cards in my hand and two cards in my discard, can I still long rest even though I will become exhausted at the beginning of the next round?
Absolutely. You can stick around for one more round as a meat shield.