A hat trick for Trump’s presidential legacy