Skip to content

Commit fb2a956

Browse files
committed
std: Move dynamic_lib from std::unstable to std
This leaves a deprecated reexport in place temporarily. Closes rust-lang#1457.
1 parent 443a1cd commit fb2a956

File tree

12 files changed

+21
-26
lines changed

12 files changed

+21
-26
lines changed

src/compiletest/procsrv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use std::os;
1212
use std::str;
1313
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
14-
use std::unstable::dynamic_lib::DynamicLibrary;
14+
use std::dynamic_lib::DynamicLibrary;
1515

1616
fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
1717
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};

src/librustc/metadata/filesearch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use std::cell::RefCell;
1414
use std::os;
1515
use std::io::fs;
16-
use std::unstable::dynamic_lib::DynamicLibrary;
16+
use std::dynamic_lib::DynamicLibrary;
1717
use std::collections::HashSet;
1818

1919
use myfs = util::fs;

src/librustdoc/plugins.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use clean;
1212

13-
use dl = std::unstable::dynamic_lib;
13+
use dl = std::dynamic_lib;
1414
use serialize::json;
1515
use std::string::String;
1616

src/librustdoc/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::io::{Command, TempDir};
1515
use std::os;
1616
use std::str;
1717
use std::string::String;
18-
use std::unstable::dynamic_lib::DynamicLibrary;
18+
use std::dynamic_lib::DynamicLibrary;
1919

2020
use std::collections::{HashSet, HashMap};
2121
use testing;

src/libstd/unstable/dynamic_lib.rs renamed to src/libstd/dynamic_lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ A simple wrapper over the platform's dynamic library facilities
1616
1717
*/
1818

19+
#![experimental]
20+
#![allow(missing_doc)]
21+
1922
use clone::Clone;
2023
use c_str::ToCStr;
2124
use iter::Iterator;

src/libstd/lib.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,12 @@ pub mod sync;
241241
/* Runtime and platform support */
242242

243243
pub mod c_vec;
244+
pub mod dynamic_lib;
244245
pub mod os;
245246
pub mod io;
246247
pub mod path;
247248
pub mod fmt;
248249

249-
// Private APIs
250-
#[unstable]
251-
pub mod unstable;
252-
253250
// FIXME #7809: This shouldn't be pub, and it should be reexported under 'unstable'
254251
// but name resolution doesn't work without it being pub.
255252
#[unstable]
@@ -279,3 +276,11 @@ mod std {
279276
// The test runner requires std::slice::Vector, so re-export std::slice just for it.
280277
#[cfg(test)] pub use slice;
281278
}
279+
280+
#[deprecated]
281+
#[allow(missing_doc)]
282+
#[doc(hiden)]
283+
pub mod unstable {
284+
#[deprecated = "use std::dynamic_lib"]
285+
pub use dynamic_lib;
286+
}

src/libstd/rt/backtrace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ mod imp {
614614
use rt::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
615615
use slice::ImmutableVector;
616616
use str::StrSlice;
617-
use unstable::dynamic_lib::DynamicLibrary;
617+
use dynamic_lib::DynamicLibrary;
618618

619619
#[allow(non_snake_case_functions)]
620620
extern "system" {

src/libstd/unstable/mod.rs

-13
This file was deleted.

src/libsyntax/ext/expand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use util::small_vector::SmallVector;
3131

3232
use std::mem;
3333
use std::os;
34-
use std::unstable::dynamic_lib::DynamicLibrary;
34+
use std::dynamic_lib::DynamicLibrary;
3535

3636
pub fn expand_expr(e: @ast::Expr, fld: &mut MacroExpander) -> @ast::Expr {
3737
match e.node {

src/test/auxiliary/linkage-visibility.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::unstable::dynamic_lib::DynamicLibrary;
11+
use std::dynamic_lib::DynamicLibrary;
1212

1313
#[no_mangle]
1414
pub fn foo() { bar(); }

src/test/run-make/extern-fn-reachable/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::unstable::dynamic_lib::DynamicLibrary;
11+
use std::dynamic_lib::DynamicLibrary;
1212
use std::os;
1313

1414
pub fn main() {

src/test/run-pass/linkage-visibility.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// aux-build:linkage-visibility.rs
1212
// ignore-android: FIXME(#10379)
13-
// ignore-win32: std::unstable::dynamic_lib does not work on win32 well
13+
// ignore-win32: std::dynamic_lib does not work on win32 well
1414

1515
extern crate foo = "linkage-visibility";
1616

0 commit comments

Comments
 (0)