If a Tesla last for 300.000km and have an average consumption of 0,2kWh/km, you will need 60.000kWh in total. Let us also assume you keep the car for 25 years which is also how long most solar panels is expected to last.
In sunny California (capacity factor of 25%) you will need 4 solar panels a 270Watt to produce 60.000kWh over the solar panels 25 year life span! The catch is that you will be limited to 12.000km a year and a maximum of 50km a day. Great if you like to park the car in the garage during day, and enjoy a joyride in the evening!