diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-01-08 19:29:16 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-01-08 19:29:16 -0800 |
| commit | 44ab00ee37c4ffb8440ff20fd8a15cd24a6f3e46 (patch) | |
| tree | 83f3d67a9e21c6ce1b99c2ce8f6a737896c673db /src/libsyntax/ext | |
| parent | a8d37af2473da79be704c9ce2374f278c47177b6 (diff) | |
| download | rust-44ab00ee37c4ffb8440ff20fd8a15cd24a6f3e46.tar.gz rust-44ab00ee37c4ffb8440ff20fd8a15cd24a6f3e46.zip | |
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/base.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/build.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/concat_idents.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/fmt.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/ast_builder.rs | 41 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/check.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/liveness.rs | 5 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/mod.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/parse_proto.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/proto.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/ext/trace_macros.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 2 |
19 files changed, 12 insertions, 84 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 152c49461b8..b8fe00e246c 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -88,14 +88,10 @@ node twice. */ -use core::prelude::*; - -use ast; use ast_util; use attr; use codemap::span; use ext::base::*; -use parse; use core::vec; use std::map; @@ -425,7 +421,7 @@ fn mk_impl( @{ // This is a new-style impl declaration. // XXX: clownshoes - ident: parse::token::special_idents::clownshoes_extensions, + ident: ast::token::special_idents::clownshoes_extensions, attrs: ~[], id: cx.next_id(), node: ast::item_impl(trait_tps, opt_trait, ty, ~[f(ty)]), diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 7b69084a827..dc774805ed3 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use ast; use ast_util::dummy_sp; use codemap; diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 4a3c8ee2259..d63f14b5774 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use ast; use codemap; use codemap::span; diff --git a/src/libsyntax/ext/concat_idents.rs b/src/libsyntax/ext/concat_idents.rs index d847cfee053..4f88ffeeb04 100644 --- a/src/libsyntax/ext/concat_idents.rs +++ b/src/libsyntax/ext/concat_idents.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use ext::base::*; use ext::base; diff --git a/src/libsyntax/ext/deriving.rs b/src/libsyntax/ext/deriving.rs index 41804b1022a..3cbc8f3834f 100644 --- a/src/libsyntax/ext/deriving.rs +++ b/src/libsyntax/ext/deriving.rs @@ -11,8 +11,6 @@ /// The compiler code necessary to implement the #[deriving_eq] and /// #[deriving_iter_bytes] extensions. -use core::prelude::*; - use ast::{Ty, and, bind_by_ref, binop, deref, enum_def, enum_variant_kind}; use ast::{expr, expr_match, ident, item, item_, item_struct, item_enum}; use ast::{item_impl, m_imm, meta_item, method, named_field, or, pat}; diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 8faeb167191..27565b44c6d 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use ast::{crate, expr_, expr_mac, mac_invoc_tt}; use ast::{tt_delim, tt_tok, item_mac, stmt_, stmt_mac, stmt_expr, stmt_semi}; use ast; diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs index 0eaa983ccad..b8a27096f73 100644 --- a/src/libsyntax/ext/fmt.rs +++ b/src/libsyntax/ext/fmt.rs @@ -16,8 +16,6 @@ * compiler syntax extension plugin interface. */ -use core::prelude::*; - use ast; use codemap::span; use ext::base::*; diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs index 56ace4aac1b..7a87d909fe6 100644 --- a/src/libsyntax/ext/pipes/ast_builder.rs +++ b/src/libsyntax/ext/pipes/ast_builder.rs @@ -13,15 +13,13 @@ // To start with, it will be use dummy spans, but it might someday do // something smarter. -use core::prelude::*; - use ast::{ident, node_id}; use ast; use ast_util::{ident_to_path, respan, dummy_sp}; use ast_util; use attr; use codemap::span; -use ext::base::{ext_ctxt, mk_ctxt}; +use ext::base::mk_ctxt; use ext::quote::rt::*; use core::vec; @@ -114,11 +112,9 @@ trait ext_ctxt_ast_builder { impl ext_ctxt: ext_ctxt_ast_builder { fn ty_option(ty: @ast::Ty) -> @ast::Ty { - self.ty_path_ast_builder(path_global(~[ - self.ident_of(~"core"), - self.ident_of(~"option"), - self.ident_of(~"Option") - ], dummy_sp()).add_ty(ty)) + self.ty_path_ast_builder(path(~[self.ident_of(~"Option")], + dummy_sp()) + .add_ty(ty)) } fn block_expr(b: ast::blk) -> @ast::expr { @@ -287,37 +283,10 @@ impl ext_ctxt: ext_ctxt_ast_builder { fn item_mod(name: ident, span: span, +items: ~[@ast::item]) -> @ast::item { - // XXX: Total hack: import `core::kinds::Owned` to work around a - // parser bug whereby `fn f<T: ::kinds::Owned>` doesn't parse. - let vi = ast::view_item_import(~[ - @{ - node: ast::view_path_simple( - self.ident_of(~"Owned"), - path( - ~[ - self.ident_of(~"core"), - self.ident_of(~"kinds"), - self.ident_of(~"Owned") - ], - ast_util::dummy_sp() - ), - ast::type_value_ns, - self.next_id() - ), - span: ast_util::dummy_sp() - } - ]); - let vi = @{ - node: vi, - attrs: ~[], - vis: ast::private, - span: ast_util::dummy_sp() - }; - self.item(name, span, ast::item_mod({ - view_items: ~[vi], + view_items: ~[], items: items})) } diff --git a/src/libsyntax/ext/pipes/check.rs b/src/libsyntax/ext/pipes/check.rs index f2ba413dd38..8eecafa8fa4 100644 --- a/src/libsyntax/ext/pipes/check.rs +++ b/src/libsyntax/ext/pipes/check.rs @@ -29,10 +29,7 @@ that. */ -use core::prelude::*; - use ast; -use codemap::span; use ext::base::ext_ctxt; use ext::pipes::proto::{state, protocol, next_state}; use ext::pipes::proto; diff --git a/src/libsyntax/ext/pipes/liveness.rs b/src/libsyntax/ext/pipes/liveness.rs index 01e99594083..76749f6b2db 100644 --- a/src/libsyntax/ext/pipes/liveness.rs +++ b/src/libsyntax/ext/pipes/liveness.rs @@ -37,11 +37,6 @@ updating the states using rule (2) until there are no changes. */ -use core::prelude::*; - -use ext::base::ext_ctxt; -use ext::pipes::protocol; - use core::str; use std::bitv::{Bitv}; diff --git a/src/libsyntax/ext/pipes/mod.rs b/src/libsyntax/ext/pipes/mod.rs index cb17e56e990..67b5c81ad2d 100644 --- a/src/libsyntax/ext/pipes/mod.rs +++ b/src/libsyntax/ext/pipes/mod.rs @@ -53,8 +53,6 @@ use ext::pipes::proto::{visit, protocol}; use parse::lexer::{new_tt_reader, reader}; use parse::parser::Parser; -use core::option::None; - #[legacy_exports] mod ast_builder; #[legacy_exports] diff --git a/src/libsyntax/ext/pipes/parse_proto.rs b/src/libsyntax/ext/pipes/parse_proto.rs index 6a6e895bd40..0f6b9dbda28 100644 --- a/src/libsyntax/ext/pipes/parse_proto.rs +++ b/src/libsyntax/ext/pipes/parse_proto.rs @@ -10,11 +10,10 @@ // Parsing pipes protocols from token trees. -use ext::pipes::pipec::*; use parse::parser; use parse::token; -use core::prelude::*; +use ext::pipes::pipec::*; trait proto_parser { fn parse_proto(id: ~str) -> protocol; diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index e88ddb841be..ef9c086e3f5 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -20,7 +20,6 @@ use parse::*; use util::interner; use core::dvec::DVec; -use core::prelude::*; use core::str; use core::to_str::ToStr; use core::vec; @@ -386,8 +385,7 @@ impl protocol: gen_init { } } - cx.ty_path_ast_builder(path(~[cx.ident_of(~"super"), - cx.ident_of(~"__Buffer")], self.span) + cx.ty_path_ast_builder(path(~[cx.ident_of(~"__Buffer")], self.span) .add_tys(cx.ty_vars_global(params))) } diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs index 9953b4de50d..a2673c481b1 100644 --- a/src/libsyntax/ext/pipes/proto.rs +++ b/src/libsyntax/ext/pipes/proto.rs @@ -8,11 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use ast; -use codemap::span; -use ext::base::ext_ctxt; use ext::pipes::ast_builder::{path, append_types}; use core::cmp; diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 4aed5b64747..184093715c6 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -18,7 +18,6 @@ use parse::token::*; use parse::token; use parse; -use core::prelude::*; use core::str; /** @@ -34,7 +33,6 @@ use core::str; pub mod rt { use ast; - use ext::base::ext_ctxt; use parse; use print::pprust; diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index 3d012b393bb..47c6ea8876e 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -16,7 +16,6 @@ use ext::build::{mk_base_vec_e, mk_uint, mk_u8, mk_base_str}; use print::pprust; use core::io; -use core::prelude::*; use core::result; use core::str; use core::vec; diff --git a/src/libsyntax/ext/trace_macros.rs b/src/libsyntax/ext/trace_macros.rs index d5031b97718..c202778d0df 100644 --- a/src/libsyntax/ext/trace_macros.rs +++ b/src/libsyntax/ext/trace_macros.rs @@ -8,18 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use ast::tt_delim; use ast; use codemap::span; -use ext::base::ext_ctxt; use ext::base; +use ext::base::ext_ctxt; +use ast::tt_delim; use parse::lexer::{new_tt_reader, reader}; use parse::parser::Parser; -use core::option::None; - fn expand_trace_macros(cx: ext_ctxt, sp: span, - tt: ~[ast::token_tree]) -> base::mac_result { + tt: ~[ast::token_tree]) -> base::mac_result +{ let sess = cx.parse_sess(); let cfg = cx.cfg(); let tt_rdr = new_tt_reader(cx.parse_sess().span_diagnostic, diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 1f1efdfe165..7386b3b67b9 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use ast::{ident, matcher_, matcher, match_tok, match_nonterminal, match_seq}; use ast::{tt_delim}; use ast; diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 47489034a0f..c1745fac710 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use core::prelude::*; - use ast; use ast::{token_tree, tt_delim, tt_tok, tt_seq, tt_nonterminal,ident}; use ast_util; |
