Skip to content

Commit

Permalink
std: Stabilize the prelude module
Browse files Browse the repository at this point in the history
This commit is an implementation of [RFC 503][rfc] which is a stabilization
story for the prelude. Most of the RFC was directly applied, removing reexports.
Some reexports are kept around, however:

* `range` remains until range syntax has landed to reduce churn.
* `Path` and `GenericPath` remain until path reform lands. This is done to
  prevent many imports of `GenericPath` which will soon be removed.
* All `io` traits remain until I/O reform lands so imports can be rewritten all
  at once to `std::io::prelude::*`.

This is a breaking change because many prelude reexports have been removed, and
the RFC can be consulted for the exact list of removed reexports, as well as to
find the locations of where to import them.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
[breaking-change]

Closes #20068
  • Loading branch information
alexcrichton committed Dec 23, 2014
1 parent 62fb41c commit ee64d2c
Show file tree
Hide file tree
Showing 316 changed files with 1,601 additions and 1,147 deletions.
4 changes: 2 additions & 2 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ extern crate regex;
use std::os;
use std::io;
use std::io::fs;
use std::str::FromStr;
use std::thunk::{Thunk};
use std::str::{FromStr, from_str};
use std::thunk::Thunk;
use getopts::{optopt, optflag, reqopt};
use common::Config;
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
Expand Down
1 change: 1 addition & 0 deletions src/compiletest/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use common::Config;
use common;
use util;
use std::str::from_str;

pub struct TestProps {
// Lines that should be expected, in order, on standard out
Expand Down
2 changes: 2 additions & 0 deletions src/doc/guide-ffi.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ them.
~~~no_run
extern crate libc;
use std::c_str::ToCStr;
use std::ptr;
#[link(name = "readline")]
Expand Down
Loading

0 comments on commit ee64d2c

Please sign in to comment.