From 56290a004493a5d2e211f056601533253497df60 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 22 Dec 2014 09:04:23 -0800 Subject: 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 --- src/libsyntax/ext/bytes.rs | 1 - src/libsyntax/ext/quote.rs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/bytes.rs b/src/libsyntax/ext/bytes.rs index 2844c0b523e..9f225d55b44 100644 --- a/src/libsyntax/ext/bytes.rs +++ b/src/libsyntax/ext/bytes.rs @@ -17,7 +17,6 @@ use ext::base; use ext::build::AstBuilder; use std::ascii::AsciiExt; - pub fn expand_syntax_ext<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index d87960ebdb8..e46bd7ac4bc 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -50,8 +50,7 @@ pub mod rt { impl ToTokens for Vec { fn to_tokens(&self, cx: &ExtCtxt) -> Vec { - let a = self.iter().flat_map(|t| t.to_tokens(cx).into_iter()); - FromIterator::from_iter(a) + self.iter().flat_map(|t| t.to_tokens(cx).into_iter()).collect() } } -- cgit 1.4.1-3-g733a5