Historical Rules · 12 July 2019
Rule 104.3c
Official source text from the 12 July 2019 Rules release
If a player is required to draw more cards than are left in their library, they draw the remaining cards and then lose the game the next time a player would receive priority. (This is a state-based action. See rule 704.)