Each cart is saved for the user as soon as the checkout is complete. The user will be able to restore previous cart as soon as he logs in next time.
The cart button will be replaced with cart restore button if previous cart is available for currently logged in user.
Also the empty cart will contain the cart restore button:
After the button is clicked customer previously purchased products will appear in the cart.
Please note that the button is available only for logged in users with previous purchase.