16
16
reason = "API has not been scrutinized and is highly likely to \
17
17
either disappear or change",
18
18
issue = "27810" ) ]
19
- #![ rustc_deprecated( since = "1.5.0" , reason = "replaced with 'dylib' on crates.io" ) ]
20
19
#![ allow( missing_docs) ]
21
20
#![ allow( deprecated) ]
22
21
@@ -26,6 +25,11 @@ use env;
26
25
use ffi:: { CString , OsString } ;
27
26
use path:: { Path , PathBuf } ;
28
27
28
+ #[ unstable( feature = "dynamic_lib" ,
29
+ reason = "API has not been scrutinized and is highly likely to \
30
+ either disappear or change",
31
+ issue = "27810" ) ]
32
+ #[ rustc_deprecated( since = "1.5.0" , reason = "replaced with 'dylib' on crates.io" ) ]
29
33
pub struct DynamicLibrary {
30
34
handle : * mut u8
31
35
}
@@ -43,6 +47,11 @@ impl Drop for DynamicLibrary {
43
47
}
44
48
}
45
49
50
+ #[ unstable( feature = "dynamic_lib" ,
51
+ reason = "API has not been scrutinized and is highly likely to \
52
+ either disappear or change",
53
+ issue = "27810" ) ]
54
+ #[ rustc_deprecated( since = "1.5.0" , reason = "replaced with 'dylib' on crates.io" ) ]
46
55
impl DynamicLibrary {
47
56
/// Lazily open a dynamic library. When passed None it gives a
48
57
/// handle to the calling process
@@ -126,7 +135,6 @@ mod tests {
126
135
use prelude:: v1:: * ;
127
136
use libc;
128
137
use mem;
129
- use path:: Path ;
130
138
131
139
#[ test]
132
140
#[ cfg_attr( any( windows,
@@ -167,6 +175,8 @@ mod tests {
167
175
target_os = "openbsd" ) ) ]
168
176
#[ allow( deprecated) ]
169
177
fn test_errors_do_not_crash ( ) {
178
+ use path:: Path ;
179
+
170
180
// Open /dev/null as a library to get an error, and make sure
171
181
// that only causes an error, and not a crash.
172
182
let path = Path :: new ( "/dev/null" ) ;
0 commit comments