about summary refs log tree commit diff
path: root/src/libstd/sys/unix/process/process_unix.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-06 10:04:21 +0000
committerbors <bors@rust-lang.org>2020-06-06 10:04:21 +0000
commite6f05ad9125beee9e43bf75d9d3742efc72e8f99 (patch)
tree81f8269594f6f9e078753c773b9271773235253e /src/libstd/sys/unix/process/process_unix.rs
parentea7066a01dceec00e19e1c13b90c41acf031d488 (diff)
parent623faac84ec56fa545163ab81d7e3b759a392353 (diff)
downloadrust-e6f05ad9125beee9e43bf75d9d3742efc72e8f99.tar.gz
rust-e6f05ad9125beee9e43bf75d9d3742efc72e8f99.zip
Auto merge of #5528 - phansch:same-tys, r=flip1995
Cleanup: Use rustc's `same_type` for our `same_tys`

This delegates our `same_tys` to [ty::TyS::same_type][same_type] to
remove some duplication.

Our `same_tys` was introduced 4 years ago in #730. Before, it was
building an inference context to be able to call
`can_eq` to compare the types. The `rustc-dev-guide` has some more details
about `can_eq` in [Type Inference -> Trying equality][try_eq].

Now, using the rustc function, we are essentially comparing the `DefId`s
of the given types, which also makes more sense, IMO.

I also confirmed that the FIXME is resolved via a bit of `dbg!`, however
no UI tests seem to have been affected.

[same_type]: https://github.com/rust-lang/rust/blob/659951c4a0d7450e43f61c61c0e87d0ceae17087/src/librustc_middle/ty/util.rs#L777
[try_eq]: https://rustc-dev-guide.rust-lang.org/type-inference.html#trying-equality

---

changelog: none
Diffstat (limited to 'src/libstd/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions