about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-22 09:04:23 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-29 08:58:21 -0800
commitc32d03f4172580e3f33e4844ed3c01234dca2d53 (patch)
tree70c57ebe6a3b5f6e8cb4609c918f9455671926be /src/libsyntax/parse
parent3dcc409fac18a258ba2a8af4345d9566ec8eebad (diff)
downloadrust-c32d03f4172580e3f33e4844ed3c01234dca2d53.tar.gz
rust-c32d03f4172580e3f33e4844ed3c01234dca2d53.zip
std: Stabilize the prelude module
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
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs3
-rw-r--r--src/libsyntax/parse/parser.rs3
-rw-r--r--src/libsyntax/parse/token.rs2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 13d020f6ae3..0f5ff33021c 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -16,6 +16,7 @@ use ext::tt::transcribe::tt_next_token;
 use parse::token;
 use parse::token::{str_to_ident};
 
+use std::borrow::IntoCow;
 use std::char;
 use std::fmt;
 use std::mem::replace;
@@ -358,7 +359,7 @@ impl<'a> StringReader<'a> {
 
     pub fn nextnextch(&self) -> Option<char> {
         let offset = self.byte_offset(self.pos).to_uint();
-        let s = self.filemap.deref().src[];
+        let s = self.filemap.src.as_slice();
         if offset >= s.len() { return None }
         let str::CharRange { next, .. } = s.char_range_at(offset);
         if next < s.len() {
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index a2e2abab03e..7b40ae85c7d 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -84,11 +84,12 @@ use owned_slice::OwnedSlice;
 
 use std::collections::HashSet;
 use std::io::fs::PathExtensions;
+use std::iter;
 use std::mem;
 use std::num::Float;
 use std::rc::Rc;
-use std::iter;
 use std::slice;
+use std::str::from_str;
 
 bitflags! {
     flags Restrictions: u8 {
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index f575d3d6c67..dbc0cef8340 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -22,8 +22,10 @@ use util::interner::{RcStr, StrInterner};
 use util::interner;
 
 use serialize::{Decodable, Decoder, Encodable, Encoder};
+use std::cmp::Equiv;
 use std::fmt;
 use std::mem;
+use std::ops::Deref;
 use std::path::BytesContainer;
 use std::rc::Rc;