Skip to content

Commit

Permalink
std: Move dynamic_lib from std::unstable to std
Browse files Browse the repository at this point in the history
This leaves a deprecated reexport in place temporarily.

Closes #1457.
  • Loading branch information
brson authored and alexcrichton committed Jun 10, 2014
1 parent 5eb4d19 commit 1635ef2
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/compiletest/procsrv.rs
Expand Up @@ -11,7 +11,7 @@
use std::os;
use std::str;
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
use std::unstable::dynamic_lib::DynamicLibrary;
use std::dynamic_lib::DynamicLibrary;

fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/filesearch.rs
Expand Up @@ -13,7 +13,7 @@
use std::cell::RefCell;
use std::os;
use std::io::fs;
use std::unstable::dynamic_lib::DynamicLibrary;
use std::dynamic_lib::DynamicLibrary;
use std::collections::HashSet;

use myfs = util::fs;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/plugin/load.rs
Expand Up @@ -16,7 +16,7 @@ use plugin::registry::Registry;

use std::mem;
use std::os;
use std::unstable::dynamic_lib::DynamicLibrary;
use std::dynamic_lib::DynamicLibrary;
use syntax::ast;
use syntax::attr;
use syntax::visit;
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/plugins.rs
Expand Up @@ -10,7 +10,7 @@

use clean;

use dl = std::unstable::dynamic_lib;
use dl = std::dynamic_lib;
use serialize::json;
use std::string::String;

Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/test.rs
Expand Up @@ -15,7 +15,7 @@ use std::io::{Command, TempDir};
use std::os;
use std::str;
use std::string::String;
use std::unstable::dynamic_lib::DynamicLibrary;
use std::dynamic_lib::DynamicLibrary;

use std::collections::{HashSet, HashMap};
use testing;
Expand Down
Expand Up @@ -16,6 +16,9 @@ A simple wrapper over the platform's dynamic library facilities
*/

#![experimental]
#![allow(missing_doc)]

use clone::Clone;
use c_str::ToCStr;
use iter::Iterator;
Expand Down
13 changes: 9 additions & 4 deletions src/libstd/lib.rs
Expand Up @@ -241,15 +241,12 @@ pub mod sync;
/* Runtime and platform support */

pub mod c_vec;
pub mod dynamic_lib;
pub mod os;
pub mod io;
pub mod path;
pub mod fmt;

// Private APIs
#[unstable]
pub mod unstable;

// FIXME #7809: This shouldn't be pub, and it should be reexported under 'unstable'
// but name resolution doesn't work without it being pub.
#[unstable]
Expand Down Expand Up @@ -279,3 +276,11 @@ mod std {
// The test runner requires std::slice::Vector, so re-export std::slice just for it.
#[cfg(test)] pub use slice;
}

#[deprecated]
#[allow(missing_doc)]
#[doc(hiden)]
pub mod unstable {
#[deprecated = "use std::dynamic_lib"]
pub use dynamic_lib;
}
2 changes: 1 addition & 1 deletion src/libstd/rt/backtrace.rs
Expand Up @@ -614,7 +614,7 @@ mod imp {
use rt::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
use slice::ImmutableVector;
use str::StrSlice;
use unstable::dynamic_lib::DynamicLibrary;
use dynamic_lib::DynamicLibrary;

#[allow(non_snake_case_functions)]
extern "system" {
Expand Down
13 changes: 0 additions & 13 deletions src/libstd/unstable/mod.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/auxiliary/linkage-visibility.rs
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::unstable::dynamic_lib::DynamicLibrary;
use std::dynamic_lib::DynamicLibrary;

#[no_mangle]
pub fn foo() { bar(); }
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-make/extern-fn-reachable/main.rs
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::unstable::dynamic_lib::DynamicLibrary;
use std::dynamic_lib::DynamicLibrary;
use std::os;

pub fn main() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/linkage-visibility.rs
Expand Up @@ -10,7 +10,7 @@

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

extern crate foo = "linkage-visibility";

Expand Down

0 comments on commit 1635ef2

Please sign in to comment.