diff options
| author | Cody P Schafer <dev@codyps.com> | 2017-04-03 10:14:10 -0400 |
|---|---|---|
| committer | Cody P Schafer <dev@codyps.com> | 2017-04-03 10:17:59 -0400 |
| commit | 9c1b7ae3f37a34a39f837ad8ae90da3fad052798 (patch) | |
| tree | 231d9d6d939be979ef64f6d06d6a15c22bde5bbe /src/test/run-pass/thinlto | |
| parent | 5309a3e31d88def1f3ea966162ed4f81f161d500 (diff) | |
| download | rust-9c1b7ae3f37a34a39f837ad8ae90da3fad052798.tar.gz rust-9c1b7ae3f37a34a39f837ad8ae90da3fad052798.zip | |
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: AsRawFd>(_: 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
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions
