1616 reason = "API has not been scrutinized and is highly likely to \
1717 either disappear or change",
1818 issue = "27810" ) ]
19- #![ rustc_deprecated( since = "1.5.0" , reason = "replaced with 'dylib' on crates.io" ) ]
2019#![ allow( missing_docs) ]
2120#![ allow( deprecated) ]
2221
@@ -26,6 +25,11 @@ use env;
2625use ffi:: { CString , OsString } ;
2726use path:: { Path , PathBuf } ;
2827
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" ) ]
2933pub struct DynamicLibrary {
3034 handle : * mut u8
3135}
@@ -43,6 +47,11 @@ impl Drop for DynamicLibrary {
4347 }
4448}
4549
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" ) ]
4655impl DynamicLibrary {
4756 /// Lazily open a dynamic library. When passed None it gives a
4857 /// handle to the calling process
@@ -126,7 +135,6 @@ mod tests {
126135 use prelude:: v1:: * ;
127136 use libc;
128137 use mem;
129- use path:: Path ;
130138
131139 #[ test]
132140 #[ cfg_attr( any( windows,
@@ -167,6 +175,8 @@ mod tests {
167175 target_os = "openbsd" ) ) ]
168176 #[ allow( deprecated) ]
169177 fn test_errors_do_not_crash ( ) {
178+ use path:: Path ;
179+
170180 // Open /dev/null as a library to get an error, and make sure
171181 // that only causes an error, and not a crash.
172182 let path = Path :: new ( "/dev/null" ) ;
0 commit comments