upstream rust: Updated deprecated functionality