File tree 3 files changed +57
-0
lines changed
3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,25 @@ pub trait IntoRawFd {
62
62
fn into_raw_fd ( self ) -> RawFd ;
63
63
}
64
64
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
+
65
84
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
66
85
impl AsRawFd for fs:: File {
67
86
fn as_raw_fd ( & self ) -> RawFd {
Original file line number Diff line number Diff line change @@ -63,6 +63,25 @@ pub trait IntoRawFd {
63
63
fn into_raw_fd ( self ) -> RawFd ;
64
64
}
65
65
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
+
66
85
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
67
86
impl AsRawFd for fs:: File {
68
87
fn as_raw_fd ( & self ) -> RawFd {
Original file line number Diff line number Diff line change @@ -52,6 +52,25 @@ pub trait IntoRawFd {
52
52
fn into_raw_fd ( self ) -> RawFd ;
53
53
}
54
54
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
+
55
74
impl AsRawFd for net:: TcpStream {
56
75
fn as_raw_fd ( & self ) -> RawFd {
57
76
self . as_inner ( ) . fd ( ) . as_raw ( )
You can’t perform that action at this time.
0 commit comments