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 rust-lang#1457.
  • Loading branch information
brson committed Jun 9, 2014
1 parent 443a1cd commit fb2a956
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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/librustdoc/plugins.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use util::small_vector::SmallVector;

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

pub fn expand_expr(e: @ast::Expr, fld: &mut MacroExpander) -> @ast::Expr {
match e.node {
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/linkage-visibility.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

2 comments on commit fb2a956

@alexcrichton
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

@alexcrichton
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors: retry

Please sign in to comment.