From: Corey Farwell Date: Wed, 5 Apr 2017 16:44:35 +0000 (-0400) Subject: Rollup merge of #41035 - jmesmon:revert-bad-raw-fd-impls, r=aturon X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=6251e4bb35517e7dc4d229e370752fd718ddecff;p=rust.git Rollup merge of #41035 - jmesmon:revert-bad-raw-fd-impls, r=aturon Revert "Implement AsRawFd/IntoRawFd for RawFd" This reverts commit 2cf686f2cdd6446a3cd47df0305ead40fabe85df (#40842) RawFd is a type alias for c_int, which is itself a type alias for i32. As a result, adding AsRawFd and IntoRawFd impls for RawFd actually adds them for i32. As a result, the reverted commit makes this valid: ``` use std::os::unix::io::AsRawFd; fn arf(_: T) {} fn main() { arf(32i32) } ``` Implimenting AsRawFd and IntoRawFd for i32 breaks the promises of both those traits that their methods return a valid RawFd. r? @aturon cc @Mic92 @kamalmarhubi --- 6251e4bb35517e7dc4d229e370752fd718ddecff