Trump's nationalist warning contrasts with European leaders' optimism at G-20