Every bit of it perfectly legal and in compliance with the IRS code.
Actually, Trump's own legal team called the maneuver "legally dubious." Nonetheless, he got away with it. Congress soon after passed new legislation to make sure that such nonsense isn't even on the radar anymore.
But the legality or non legality of the maneuver is not the question here. Getting back to the topic, Trump's life is a history of breaking deals, not making them.
The 20 year carry forward is still in effect according to the IRS.
Publication 536 (2015), Net Operating Losses (NOLs) for Individuals, Estates, and Trusts
His experience is exactly what we need to break and make NAFTA a FAIR trade agreement instead of a FREE trade agreement.