File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,25 @@ pub trait IntoRawFd {
6262 fn into_raw_fd ( self ) -> RawFd ;
6363}
6464
65+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
66+ impl AsRawFd for RawFd {
67+ fn as_raw_fd ( & self ) -> RawFd {
68+ * self
69+ }
70+ }
71+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
72+ impl IntoRawFd for RawFd {
73+ fn into_raw_fd ( self ) -> RawFd {
74+ self
75+ }
76+ }
77+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
78+ impl FromRawFd for RawFd {
79+ unsafe fn from_raw_fd ( fd : RawFd ) -> RawFd {
80+ fd
81+ }
82+ }
83+
6584#[ stable( feature = "rust1" , since = "1.0.0" ) ]
6685impl AsRawFd for fs:: File {
6786 fn as_raw_fd ( & self ) -> RawFd {
Original file line number Diff line number Diff line change @@ -63,6 +63,25 @@ pub trait IntoRawFd {
6363 fn into_raw_fd ( self ) -> RawFd ;
6464}
6565
66+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
67+ impl AsRawFd for RawFd {
68+ fn as_raw_fd ( & self ) -> RawFd {
69+ * self
70+ }
71+ }
72+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
73+ impl IntoRawFd for RawFd {
74+ fn into_raw_fd ( self ) -> RawFd {
75+ self
76+ }
77+ }
78+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
79+ impl FromRawFd for RawFd {
80+ unsafe fn from_raw_fd ( fd : RawFd ) -> RawFd {
81+ fd
82+ }
83+ }
84+
6685#[ stable( feature = "rust1" , since = "1.0.0" ) ]
6786impl AsRawFd for fs:: File {
6887 fn as_raw_fd ( & self ) -> RawFd {
Original file line number Diff line number Diff line change @@ -52,6 +52,25 @@ pub trait IntoRawFd {
5252 fn into_raw_fd ( self ) -> RawFd ;
5353}
5454
55+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
56+ impl AsRawFd for RawFd {
57+ fn as_raw_fd ( & self ) -> RawFd {
58+ * self
59+ }
60+ }
61+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
62+ impl IntoRawFd for RawFd {
63+ fn into_raw_fd ( self ) -> RawFd {
64+ self
65+ }
66+ }
67+ #[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
68+ impl FromRawFd for RawFd {
69+ unsafe fn from_raw_fd ( fd : RawFd ) -> RawFd {
70+ fd
71+ }
72+ }
73+
5574impl AsRawFd for net:: TcpStream {
5675 fn as_raw_fd ( & self ) -> RawFd {
5776 self . as_inner ( ) . fd ( ) . as_raw ( )
You can’t perform that action at this time.
0 commit comments