I have lost count of the number of baking trays, cake tins and tart cases I have had to throw away because parts of them have gone rusty.
It’s always the underside of the lip or a corner- this is usually because these areas are so hard to dry after washing them up. Even if you put them in a dishwasher and leave them to steam dry afterwards, they will stay wet in those places as they are tight and collect the water.
A simple solution, and one I wish I had thought of years ago, is to wash your trays etc as usual and then put them back into the oven while the oven is still cooling down. The residual heat will dry every part of your tins and you will never have rust again!