Well that provides iron (micro nutrient) to the soil... very unlikely it will cause any harm at all to the plants
To be total honest rusting nails is an age old application associated to acidic soils where FE- iron def is commonly known between us true gardeners by trade...