Auto merge of #31083 - SimonSapin:set_port, r=alexcrichton
Auto merge of #31083 - SimonSapin:set_port, r=alexcrichton

As demonstrated in the `resolve_socket_addr` change, this is less awkward than re-creating a new address from the other parts.

If this is to be accepted, pleas open a tracking issue (I can’t set the appropriate tags) and I’ll update the PR with the tracking issue number.

graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust