Engine damage: Diesel fuel has a higher energy density than gasoline, which means it burns hotter and can damage the pistons, cylinder walls, and valves.
Fuel injector damage: Diesel fuel can clog the fuel injectors, preventing the engine from getting the fuel it needs to run properly.
Fuel pump damage: Diesel fuel can also damage the fuel pump, which is responsible for delivering fuel to the engine.
In addition to these mechanical issues, using diesel fuel in a gasoline engine can also void your warranty.
If you have put diesel fuel in your Hyundai Elantra, you should stop driving it immediately and have it towed to a mechanic. The mechanic will be able to drain the diesel fuel from the tank and make repairs as necessary.