upstream rust fixes