mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
std: Move dynamic_lib from std::unstable to std
This leaves a deprecated reexport in place temporarily. Closes #1457.
This commit is contained in:
parent
5eb4d19dc3
commit
1635ef2a19
@ -11,7 +11,7 @@
|
|||||||
use std::os;
|
use std::os;
|
||||||
use std::str;
|
use std::str;
|
||||||
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
|
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)> {
|
fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
|
||||||
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};
|
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::io::fs;
|
use std::io::fs;
|
||||||
use std::unstable::dynamic_lib::DynamicLibrary;
|
use std::dynamic_lib::DynamicLibrary;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use myfs = util::fs;
|
use myfs = util::fs;
|
||||||
|
@ -16,7 +16,7 @@ use plugin::registry::Registry;
|
|||||||
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::unstable::dynamic_lib::DynamicLibrary;
|
use std::dynamic_lib::DynamicLibrary;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::visit;
|
use syntax::visit;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
use clean;
|
use clean;
|
||||||
|
|
||||||
use dl = std::unstable::dynamic_lib;
|
use dl = std::dynamic_lib;
|
||||||
use serialize::json;
|
use serialize::json;
|
||||||
use std::string::String;
|
use std::string::String;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ use std::io::{Command, TempDir};
|
|||||||
use std::os;
|
use std::os;
|
||||||
use std::str;
|
use std::str;
|
||||||
use std::string::String;
|
use std::string::String;
|
||||||
use std::unstable::dynamic_lib::DynamicLibrary;
|
use std::dynamic_lib::DynamicLibrary;
|
||||||
|
|
||||||
use std::collections::{HashSet, HashMap};
|
use std::collections::{HashSet, HashMap};
|
||||||
use testing;
|
use testing;
|
||||||
|
@ -16,6 +16,9 @@ A simple wrapper over the platform's dynamic library facilities
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#![experimental]
|
||||||
|
#![allow(missing_doc)]
|
||||||
|
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use c_str::ToCStr;
|
use c_str::ToCStr;
|
||||||
use iter::Iterator;
|
use iter::Iterator;
|
@ -241,15 +241,12 @@ pub mod sync;
|
|||||||
/* Runtime and platform support */
|
/* Runtime and platform support */
|
||||||
|
|
||||||
pub mod c_vec;
|
pub mod c_vec;
|
||||||
|
pub mod dynamic_lib;
|
||||||
pub mod os;
|
pub mod os;
|
||||||
pub mod io;
|
pub mod io;
|
||||||
pub mod path;
|
pub mod path;
|
||||||
pub mod fmt;
|
pub mod fmt;
|
||||||
|
|
||||||
// Private APIs
|
|
||||||
#[unstable]
|
|
||||||
pub mod unstable;
|
|
||||||
|
|
||||||
// FIXME #7809: This shouldn't be pub, and it should be reexported under '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.
|
// but name resolution doesn't work without it being pub.
|
||||||
#[unstable]
|
#[unstable]
|
||||||
@ -279,3 +276,11 @@ mod std {
|
|||||||
// The test runner requires std::slice::Vector, so re-export std::slice just for it.
|
// The test runner requires std::slice::Vector, so re-export std::slice just for it.
|
||||||
#[cfg(test)] pub use slice;
|
#[cfg(test)] pub use slice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[deprecated]
|
||||||
|
#[allow(missing_doc)]
|
||||||
|
#[doc(hiden)]
|
||||||
|
pub mod unstable {
|
||||||
|
#[deprecated = "use std::dynamic_lib"]
|
||||||
|
pub use dynamic_lib;
|
||||||
|
}
|
||||||
|
@ -614,7 +614,7 @@ mod imp {
|
|||||||
use rt::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
|
use rt::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
|
||||||
use slice::ImmutableVector;
|
use slice::ImmutableVector;
|
||||||
use str::StrSlice;
|
use str::StrSlice;
|
||||||
use unstable::dynamic_lib::DynamicLibrary;
|
use dynamic_lib::DynamicLibrary;
|
||||||
|
|
||||||
#[allow(non_snake_case_functions)]
|
#[allow(non_snake_case_functions)]
|
||||||
extern "system" {
|
extern "system" {
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
|
|
||||||
// file at the top-level directory of this distribution and at
|
|
||||||
// http://rust-lang.org/COPYRIGHT.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
||||||
// option. This file may not be copied, modified, or distributed
|
|
||||||
// except according to those terms.
|
|
||||||
|
|
||||||
#![doc(hidden)]
|
|
||||||
|
|
||||||
pub mod dynamic_lib;
|
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use std::unstable::dynamic_lib::DynamicLibrary;
|
use std::dynamic_lib::DynamicLibrary;
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn foo() { bar(); }
|
pub fn foo() { bar(); }
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use std::unstable::dynamic_lib::DynamicLibrary;
|
use std::dynamic_lib::DynamicLibrary;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// aux-build:linkage-visibility.rs
|
// aux-build:linkage-visibility.rs
|
||||||
// ignore-android: FIXME(#10379)
|
// 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";
|
extern crate foo = "linkage-visibility";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user