We've done this blog before last year regarding rust. Some corporate conglomerates will walk away in the middle of an install if there is any sign of rust in the work area, leaving you with an undrivable vehicle. Where there is supposed to be glue. as you can see in this first image, there is rust in the full path of the windshield glue. This means that there was no bonding to the windshield. You can see how this would be a safety concern. This was just a small section of the complete bonded areas around the windshield. This is most certainly due to a previous installer not covering their scratches underneath with primer after trimming out the glue.
Once you come across this, what should be done is sanding down the rust to bare metal, being careful not to create any new scratches where the windshield will NOT cover, ruining it cosmetically. Even the smallest signs of rust should be dealt with, down to the bare metal.
Finally, once all debris is brushed and blown away, the final step would be to primer the sanded, exposed areas. The purpose is so the glue will bond to the pinch weld, and it will not rust out any further. A few short minutes, and you're ready to lay your glue and set your windshield.