There were plenty of weapons systems that would allow the F-35 to replace and pass all the roles of the A-10. All of them were cancelled. But at least we still have diversity training.
Those systems are in production now. The F-35 can take out more armor with fewer friendly casualties and greater survivability than the A-10.
And it can perform several roles which the A-10 cannot.