Auto merge of #61803 - Centril:write_resolution, r=petrochenkov
Auto merge of #61803 - Centril:write_resolution, r=petrochenkov

typeck: small refactoring, add 'fn write_resolution'

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