diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-03-31 11:43:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-31 11:43:31 -0400 |
| commit | eeb075af257af00e57a21bffd20f1b6148a4b23d (patch) | |
| tree | c1fc0af9eebd421c81da114ca4c8fc6cb587a67e /src/test/run-pass/thinlto | |
| parent | d2128fd16667e5b7ec3624fc1733bb573a80441a (diff) | |
| parent | 2cf686f2cdd6446a3cd47df0305ead40fabe85df (diff) | |
| download | rust-eeb075af257af00e57a21bffd20f1b6148a4b23d.tar.gz rust-eeb075af257af00e57a21bffd20f1b6148a4b23d.zip | |
Rollup merge of #40842 - Mic92:RawFd, r=aturon
Implement AsRawFd/IntoRawFd for RawFd This is useful to build os abstraction like the nix crate does. It allows to define functions, which accepts generic arguments of data structures convertible to RawFd, including RawFd itself. For example: ``` fn write<FD: AsRawFd>(fd: FD, buf: &[u8]) -> Result<usize> write(file, buf); ``` instead of: ``` fn write(fd: RawFd, buf: &[u8]) -> Result<usize> write(file.as_raw_fd(), buf); ``` cc @kamalmarhubi
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions
