Skip to content

Commit e9ac719

Browse files
committed
auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatch
Sets the stage for further cleanup (especially mass-slaughter of `@`)
2 parents efd1438 + a616531 commit e9ac719

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+97
-222
lines changed

src/libsyntax/abi.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
13-
use core::to_bytes;
11+
use std::to_bytes;
1412

1513
#[deriving(Eq)]
1614
pub enum Abi {

src/libsyntax/ast.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@
1010

1111
// The Rust abstract syntax tree.
1212

13-
use core::prelude::*;
14-
1513
use codemap::{span, spanned};
1614
use abi::AbiSet;
1715
use opt_vec::OptVec;
1816
use parse::token::{interner_get, str_to_ident};
1917

20-
use core::hashmap::HashMap;
21-
use core::option::Option;
22-
use core::to_bytes::IterBytes;
23-
use core::to_bytes;
24-
use core::to_str::ToStr;
18+
use std::hashmap::HashMap;
19+
use std::option::Option;
20+
use std::to_bytes::IterBytes;
21+
use std::to_bytes;
22+
use std::to_str::ToStr;
2523
use extra::serialize::{Encodable, Decodable, Encoder, Decoder};
2624

2725

src/libsyntax/ast_map.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use abi::AbiSet;
1412
use ast::*;
1513
use ast;
@@ -22,9 +20,9 @@ use print::pprust;
2220
use visit;
2321
use syntax::parse::token::special_idents;
2422

25-
use core::cmp;
26-
use core::hashmap::HashMap;
27-
use core::vec;
23+
use std::cmp;
24+
use std::hashmap::HashMap;
25+
use std::vec;
2826

2927
pub enum path_elt {
3028
path_mod(ident),

src/libsyntax/ast_util.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast::*;
1412
use ast;
1513
use ast_util;
1614
use codemap::{span, spanned};
17-
use core::cast;
18-
use core::local_data;
1915
use opt_vec;
2016
use parse::token;
2117
use visit;
2218

23-
use core::hashmap::HashMap;
24-
use core::int;
25-
use core::option;
26-
use core::to_bytes;
19+
use std::hashmap::HashMap;
20+
use std::int;
21+
use std::option;
22+
use std::to_bytes;
23+
use std::cast;
24+
use std::local_data;
2725

2826
pub fn path_name_i(idents: &[ident]) -> ~str {
2927
// FIXME: Bad copies (#2543 -- same for everything else that says "bad")
@@ -793,7 +791,7 @@ pub fn getLast(arr: &~[Mrk]) -> uint {
793791
mod test {
794792
use ast::*;
795793
use super::*;
796-
use core::io;
794+
use std::io;
797795
798796
#[test] fn xorpush_test () {
799797
let mut s = ~[];

src/libsyntax/attr.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Functions dealing with attributes and meta_items
1212

13-
use core::prelude::*;
13+
use extra;
1414

1515
use ast;
1616
use codemap::{spanned, dummy_spanned};
@@ -19,10 +19,8 @@ use codemap::BytePos;
1919
use diagnostic::span_handler;
2020
use parse::comments::{doc_comment_style, strip_doc_comment_decoration};
2121

22-
use core::hashmap::HashSet;
23-
use core::vec;
24-
use extra;
25-
22+
use std::hashmap::HashSet;
23+
use std::vec;
2624
/* Constructors */
2725

2826
pub fn mk_name_value_item_str(name: @str, value: @str)

src/libsyntax/codemap.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ source code snippets, etc.
2121
2222
*/
2323

24-
use core::prelude::*;
25-
26-
use core::cmp;
27-
use core::to_bytes;
28-
use core::uint;
24+
use std::cmp;
25+
use std::to_bytes;
26+
use std::uint;
2927
use extra::serialize::{Encodable, Decodable, Encoder, Decoder};
3028

3129
pub trait Pos {

src/libsyntax/diagnostic.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use codemap::{Pos, span};
1412
use codemap;
1513

16-
use core::io;
17-
use core::uint;
18-
use core::vec;
14+
use std::io;
15+
use std::uint;
16+
use std::vec;
1917
use extra::term;
2018

2119
pub type Emitter = @fn(cmsp: Option<(@codemap::CodeMap, span)>,

src/libsyntax/ext/asm.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212
* Inline assembly support.
1313
*/
1414

15-
use core::prelude::*;
16-
17-
use core::vec;
1815
use ast;
1916
use codemap::span;
2017
use ext::base;
2118
use ext::base::*;
2219
use parse;
2320
use parse::token;
2421

22+
use std::vec;
23+
2524
enum State {
2625
Asm,
2726
Outputs,

src/libsyntax/ext/base.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
13-
use core::vec;
1411
use ast;
1512
use ast::Name;
1613
use codemap;
@@ -22,7 +19,8 @@ use parse;
2219
use parse::token;
2320
use parse::token::{ident_to_str, intern, str_to_ident};
2421

25-
use core::hashmap::HashMap;
22+
use std::vec;
23+
use std::hashmap::HashMap;
2624

2725
// new-style macro! tt code:
2826
//
@@ -535,7 +533,7 @@ fn satisfies_pred<K : Eq + Hash + IterBytes,V>(map : &mut HashMap<K,V>,
535533
#[cfg(test)]
536534
mod test {
537535
use super::MapChain;
538-
use core::hashmap::HashMap;
536+
use std::hashmap::HashMap;
539537
540538
#[test] fn testenv () {
541539
let mut a = HashMap::new();

src/libsyntax/ext/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use abi::AbiSet;
1412
use ast::ident;
1513
use ast;

src/libsyntax/ext/concat_idents.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast;
1412
use codemap::span;
1513
use ext::base::*;

src/libsyntax/ext/deriving/clone.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast::{meta_item, item, expr};
1412
use codemap::span;
1513
use ext::base::ExtCtxt;

src/libsyntax/ext/deriving/cmp/eq.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast::{meta_item, item, expr};
1412
use codemap::span;
1513
use ext::base::ExtCtxt;

src/libsyntax/ext/deriving/cmp/ord.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast;
1412
use ast::{meta_item, item, expr};
1513
use codemap::span;

src/libsyntax/ext/deriving/cmp/totaleq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
11+
use std::prelude::*;
1212

1313
use ast::{meta_item, item, expr};
1414
use codemap::span;

src/libsyntax/ext/deriving/cmp/totalord.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast::{meta_item, item, expr};
1412
use codemap::span;
1513
use ext::base::ExtCtxt;
1614
use ext::build::AstBuilder;
1715
use ext::deriving::generic::*;
18-
use core::cmp::{Ordering, Equal, Less, Greater};
16+
use std::cmp::{Ordering, Equal, Less, Greater};
1917

2018
pub fn expand_deriving_totalord(cx: @ExtCtxt,
2119
span: span,

src/libsyntax/ext/deriving/decodable.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ The compiler code necessary for #[deriving(Decodable)]. See
1313
encodable.rs for more.
1414
*/
1515

16-
use core::prelude::*;
17-
use core::vec;
18-
use core::uint;
16+
use std::vec;
17+
use std::uint;
1918

2019
use ast::{meta_item, item, expr, m_mutbl};
2120
use codemap::span;

src/libsyntax/ext/deriving/encodable.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ would yield functions like:
7575
}
7676
*/
7777

78-
use core::prelude::*;
79-
8078
use ast::{meta_item, item, expr, m_imm, m_mutbl};
8179
use codemap::span;
8280
use ext::base::ExtCtxt;

src/libsyntax/ext/deriving/generic.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ StaticEnum(<ast::enum_def of C>, ~[(<ident of C0>, Left(1)),
162162
163163
*/
164164

165-
use core::prelude::*;
166-
167165
use ast;
168166
use ast::{enum_def, expr, ident, Generics, struct_def};
169167

@@ -172,8 +170,8 @@ use ext::build::AstBuilder;
172170
use codemap::{span,respan};
173171
use opt_vec;
174172

175-
use core::uint;
176-
use core::vec;
173+
use std::uint;
174+
use std::vec;
177175

178176
pub use self::ty::*;
179177
mod ty;
@@ -195,7 +193,7 @@ pub struct TraitDef<'self> {
195193
pub struct MethodDef<'self> {
196194
/// name of the method
197195
name: &'self str,
198-
/// List of generics, e.g. `R: core::rand::Rng`
196+
/// List of generics, e.g. `R: std::rand::Rng`
199197
generics: LifetimeBounds<'self>,
200198

201199
/// Whether there is a self argument (outer Option) i.e. whether

src/libsyntax/ext/deriving/iter_bytes.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast::{meta_item, item, expr, and};
1412
use codemap::span;
1513
use ext::base::ExtCtxt;

src/libsyntax/ext/deriving/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ library.
1818
1919
*/
2020

21-
use core::prelude::*;
22-
2321
use ast::{enum_def, ident, item, Generics, meta_item, struct_def};
2422
use ext::base::ExtCtxt;
2523
use ext::build::AstBuilder;

src/libsyntax/ext/deriving/rand.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast;
1412
use ast::{meta_item, item, expr, ident};
1513
use codemap::span;
1614
use ext::base::ExtCtxt;
1715
use ext::build::{AstBuilder, Duplicate};
1816
use ext::deriving::generic::*;
1917

20-
use core::vec;
18+
use std::vec;
2119

2220
pub fn expand_deriving_rand(cx: @ExtCtxt,
2321
span: span,

src/libsyntax/ext/deriving/to_str.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast;
1412
use ast::{meta_item, item, expr};
1513
use codemap::span;

src/libsyntax/ext/deriving/ty.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ A mini version of ast::Ty, which is easier to use, and features an
1313
explicit `Self` type to use when specifying impls to be derived.
1414
*/
1515

16-
use core::prelude::*;
17-
1816
use ast;
1917
use ast::{expr,Generics,ident};
2018
use ext::base::ExtCtxt;
@@ -29,7 +27,7 @@ pub enum PtrTy<'self> {
2927
Borrowed(Option<&'self str>, ast::mutability), // &['lifetime] [mut]
3028
}
3129

32-
/// A path, e.g. `::core::option::Option::<int>` (global). Has support
30+
/// A path, e.g. `::std::option::Option::<int>` (global). Has support
3331
/// for type parameters and a lifetime.
3432
pub struct Path<'self> {
3533
path: ~[&'self str],

src/libsyntax/ext/deriving/zero.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
12-
1311
use ast::{meta_item, item, expr};
1412
use codemap::span;
1513
use ext::base::ExtCtxt;
1614
use ext::build::AstBuilder;
1715
use ext::deriving::generic::*;
1816

19-
use core::vec;
17+
use std::vec;
2018

2119
pub fn expand_deriving_zero(cx: @ExtCtxt,
2220
span: span,

0 commit comments

Comments
 (0)