This should also allow us to clean up the implementation of https://github.com/rust-lang/rust/pull/60284.