Many people suggest using tyres (tires in the US) as cheap contains in which to grow food. It is bad idea as rubber breaks down to a fine toxic dust. Also: “Although tyres remain substantially intact for decades, some of their components can break down and leach. Environmental conern centres on the highly toxic additives used in their manufacture, such as zinc, chromium, lead, copper, cadmium and sulphur.” See the full aticle here
Personally, I would never have them in my garden and would never want to grow food near where they have broken down.
The other big issue is foam backed carpet is used a weed suppressant. Again, find particle of rubber can be left in the soil. Don’t use it!