No. Iron Oxide (what rust is) is common in many soils, and iron is a human nutrient, too.
I think your compost bin might have a short life being made of steel, but I don’t think there’s any harm to the compost.
If you use a metal barrel, I would recommend drilling about 1/2 inch holes all over it. It needs to be able to breath, and drain in order to make compost.
