pub fn serialize<S: Serializer, V: Serialize>( map: &HashMap<DefId, V>, serializer: S, ) -> Result<S::Ok, S::Error>