The car industry says it could struggle after a ban on new petrol and diesel cars was brought forward to 2030.