mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 03:23:25 +00:00
doc: convert remaining uses of core:: to std::.
This commit is contained in:
parent
abe94f9b4d
commit
72fd02d939
@ -13,7 +13,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
// must match core::ctypes
|
// must match std::ctypes
|
||||||
|
|
||||||
#define C_FLT(x) (float)x
|
#define C_FLT(x) (float)x
|
||||||
#define C_DBL(x) (double)x
|
#define C_DBL(x) (double)x
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# xfail-license
|
# xfail-license
|
||||||
|
|
||||||
# This creates the tables used for distributions implemented using the
|
# This creates the tables used for distributions implemented using the
|
||||||
# ziggurat algorithm in `core::rand::distributions;`. They are
|
# ziggurat algorithm in `std::rand::distributions;`. They are
|
||||||
# (basically) the tables as used in the ZIGNOR variant (Doornik 2005).
|
# (basically) the tables as used in the ZIGNOR variant (Doornik 2005).
|
||||||
# They are changed rarely, so the generated file should be checked in
|
# They are changed rarely, so the generated file should be checked in
|
||||||
# to git.
|
# to git.
|
||||||
|
@ -36,7 +36,7 @@ _rustc_opts_lint=(
|
|||||||
'path-statement[path statements with no effect]'
|
'path-statement[path statements with no effect]'
|
||||||
'missing-trait-doc[detects missing documentation for traits]'
|
'missing-trait-doc[detects missing documentation for traits]'
|
||||||
'missing-struct-doc[detects missing documentation for structs]'
|
'missing-struct-doc[detects missing documentation for structs]'
|
||||||
'ctypes[proper use of core::libc types in foreign modules]'
|
'ctypes[proper use of std::libc types in foreign modules]'
|
||||||
"unused-mut[detect mut variables which don't need to be mutable]"
|
"unused-mut[detect mut variables which don't need to be mutable]"
|
||||||
'unused-imports[imports that are never used]'
|
'unused-imports[imports that are never used]'
|
||||||
'heap-memory[use of any (~ type or @ type) heap memory]'
|
'heap-memory[use of any (~ type or @ type) heap memory]'
|
||||||
|
@ -1029,9 +1029,9 @@ pub fn FILE_reader(f: *libc::FILE, cleanup: bool) -> @Reader {
|
|||||||
* # Example
|
* # Example
|
||||||
*
|
*
|
||||||
* ~~~ {.rust}
|
* ~~~ {.rust}
|
||||||
* let stdin = core::io::stdin();
|
* let stdin = std::io::stdin();
|
||||||
* let line = stdin.read_line();
|
* let line = stdin.read_line();
|
||||||
* core::io::print(line);
|
* std::io::print(line);
|
||||||
* ~~~
|
* ~~~
|
||||||
*/
|
*/
|
||||||
pub fn stdin() -> @Reader {
|
pub fn stdin() -> @Reader {
|
||||||
@ -1598,7 +1598,7 @@ pub fn buffered_file_writer(path: &Path) -> Result<@Writer, ~str> {
|
|||||||
* # Example
|
* # Example
|
||||||
*
|
*
|
||||||
* ~~~ {.rust}
|
* ~~~ {.rust}
|
||||||
* let stdout = core::io::stdout();
|
* let stdout = std::io::stdout();
|
||||||
* stdout.write_str("hello\n");
|
* stdout.write_str("hello\n");
|
||||||
* ~~~
|
* ~~~
|
||||||
*/
|
*/
|
||||||
@ -1610,7 +1610,7 @@ pub fn stdout() -> @Writer { fd_writer(libc::STDOUT_FILENO as c_int, false) }
|
|||||||
* # Example
|
* # Example
|
||||||
*
|
*
|
||||||
* ~~~ {.rust}
|
* ~~~ {.rust}
|
||||||
* let stderr = core::io::stderr();
|
* let stderr = std::io::stderr();
|
||||||
* stderr.write_str("hello\n");
|
* stderr.write_str("hello\n");
|
||||||
* ~~~
|
* ~~~
|
||||||
*/
|
*/
|
||||||
|
@ -411,7 +411,7 @@ pub fn pipe() -> Pipe {
|
|||||||
// inheritance has to be handled in a different way that I do not
|
// inheritance has to be handled in a different way that I do not
|
||||||
// fully understand. Here we explicitly make the pipe non-inheritable,
|
// fully understand. Here we explicitly make the pipe non-inheritable,
|
||||||
// which means to pass it to a subprocess they need to be duplicated
|
// which means to pass it to a subprocess they need to be duplicated
|
||||||
// first, as in core::run.
|
// first, as in std::run.
|
||||||
let mut fds = Pipe {input: 0 as c_int,
|
let mut fds = Pipe {input: 0 as c_int,
|
||||||
out: 0 as c_int };
|
out: 0 as c_int };
|
||||||
let res = libc::pipe(&mut fds.input, 1024 as ::libc::c_uint,
|
let res = libc::pipe(&mut fds.input, 1024 as ::libc::c_uint,
|
||||||
|
@ -66,7 +66,7 @@ fn ziggurat<R:Rng>(rng: &mut R,
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ~~~
|
/// ~~~
|
||||||
/// use core::rand::distributions::StandardNormal;
|
/// use std::rand::distributions::StandardNormal;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let normal = 2.0 + (*rand::random::<StandardNormal>()) * 3.0;
|
/// let normal = 2.0 + (*rand::random::<StandardNormal>()) * 3.0;
|
||||||
@ -120,7 +120,7 @@ impl Rand for StandardNormal {
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ~~~
|
/// ~~~
|
||||||
/// use core::rand::distributions::Exp1;
|
/// use std::rand::distributions::Exp1;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let exp2 = (*rand::random::<Exp1>()) * 0.5;
|
/// let exp2 = (*rand::random::<Exp1>()) * 0.5;
|
||||||
|
@ -19,7 +19,7 @@ file, TCP, UDP, Unix domain sockets.
|
|||||||
Readers and Writers may be composed to add capabilities like string
|
Readers and Writers may be composed to add capabilities like string
|
||||||
parsing, encoding, and compression.
|
parsing, encoding, and compression.
|
||||||
|
|
||||||
This will likely live in core::io, not core::rt::io.
|
This will likely live in std::io, not std::rt::io.
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
|
@ -40,17 +40,17 @@ out of `rt` as development proceeds.
|
|||||||
|
|
||||||
Several modules in `core` are clients of `rt`:
|
Several modules in `core` are clients of `rt`:
|
||||||
|
|
||||||
* `core::task` - The user-facing interface to the Rust task model.
|
* `std::task` - The user-facing interface to the Rust task model.
|
||||||
* `core::task::local_data` - The interface to local data.
|
* `std::task::local_data` - The interface to local data.
|
||||||
* `core::gc` - The garbage collector.
|
* `std::gc` - The garbage collector.
|
||||||
* `core::unstable::lang` - Miscellaneous lang items, some of which rely on `core::rt`.
|
* `std::unstable::lang` - Miscellaneous lang items, some of which rely on `std::rt`.
|
||||||
* `core::condition` - Uses local data.
|
* `std::condition` - Uses local data.
|
||||||
* `core::cleanup` - Local heap destruction.
|
* `std::cleanup` - Local heap destruction.
|
||||||
* `core::io` - In the future `core::io` will use an `rt` implementation.
|
* `std::io` - In the future `std::io` will use an `rt` implementation.
|
||||||
* `core::logging`
|
* `std::logging`
|
||||||
* `core::pipes`
|
* `std::pipes`
|
||||||
* `core::comm`
|
* `std::comm`
|
||||||
* `core::stackwalk`
|
* `std::stackwalk`
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ pub mod rc;
|
|||||||
/// scheduler and task context
|
/// scheduler and task context
|
||||||
pub mod tube;
|
pub mod tube;
|
||||||
|
|
||||||
/// Simple reimplementation of core::comm
|
/// Simple reimplementation of std::comm
|
||||||
pub mod comm;
|
pub mod comm;
|
||||||
|
|
||||||
mod select;
|
mod select;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
Bindings to libuv, along with the default implementation of `core::rt::rtio`.
|
Bindings to libuv, along with the default implementation of `std::rt::rtio`.
|
||||||
|
|
||||||
UV types consist of the event loop (Loop), Watchers, Requests and
|
UV types consist of the event loop (Loop), Watchers, Requests and
|
||||||
Callbacks.
|
Callbacks.
|
||||||
|
@ -100,7 +100,7 @@ pub struct Lifetime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// a "Path" is essentially Rust's notion of a name;
|
// a "Path" is essentially Rust's notion of a name;
|
||||||
// for instance: core::cmp::Eq . It's represented
|
// for instance: std::cmp::Eq . It's represented
|
||||||
// as a sequence of identifiers, along with a bunch
|
// as a sequence of identifiers, along with a bunch
|
||||||
// of supporting information.
|
// of supporting information.
|
||||||
#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
|
#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
|
||||||
@ -1093,8 +1093,8 @@ pub enum inlined_item {
|
|||||||
/* hold off on tests ... they appear in a later merge.
|
/* hold off on tests ... they appear in a later merge.
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use core::option::{None, Option, Some};
|
use std::option::{None, Option, Some};
|
||||||
use core::uint;
|
use std::uint;
|
||||||
use extra;
|
use extra;
|
||||||
use codemap::*;
|
use codemap::*;
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -31,7 +31,7 @@ const size_t default_log_level = log_err;
|
|||||||
|
|
||||||
// This is a rather ugly parser for strings in the form
|
// This is a rather ugly parser for strings in the form
|
||||||
// "crate1,crate2.mod3,crate3.x=1". Log levels are 0-255,
|
// "crate1,crate2.mod3,crate3.x=1". Log levels are 0-255,
|
||||||
// with the most likely ones being 0-3 (defined in core::).
|
// with the most likely ones being 0-3 (defined in std::).
|
||||||
size_t parse_logging_spec(char* spec, log_directive* dirs) {
|
size_t parse_logging_spec(char* spec, log_directive* dirs) {
|
||||||
size_t dir = 0;
|
size_t dir = 0;
|
||||||
while (dir < max_log_directives && *spec) {
|
while (dir < max_log_directives && *spec) {
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// xfail-test
|
// xfail-test
|
||||||
use core::io::ReaderUtil;
|
use std::io::ReaderUtil;
|
||||||
use core::io::Reader;
|
use std::io::Reader;
|
||||||
|
|
||||||
fn bar(r:@ReaderUtil) -> ~str { r.read_line() }
|
fn bar(r:@ReaderUtil) -> ~str { r.read_line() }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user