about summary refs log tree commit diff
path: root/src/libsyntax/ast_util.rs
AgeCommit message (Collapse)AuthorLines
2013-08-15Switch to new <V:Visitor> visitor (rather than @Visitor).Felix S. Klock II-72/+77
Alpha-renamed top-level visit_* functions to walk_*. (Motivation: Distinguish visit action and recursive traversal.) Abstract over `&mut self` rather than over `@mut self`. This required some acrobatics, notably the `impl<E> Visitor<E> for @mut Visitor<E>` and corresponding introduction of `@mut Visitor` and some local `let mut` bindings. Remove oldvisit reference. Added default implementations for all of the Visitor trait methods. Note that both `visit_expr_post` and `visit_ty` are no-op's by default, just like they are in `oldvisit::default_visitor`. Refactoring: extract logic to ease swapping visit for oldvisit (hopefully).
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-1/+1
Closes #5495
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-25/+25
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-1/+1
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-1/+1
2013-08-05Fix an unused variable warning and clean up some dead code/names.Michael Sullivan-1/+1
2013-08-03remove obsolete `foreach` keywordDaniel Micay-8/+8
this has been replaced by `for`
2013-08-02librustc: Introduce a new visitor type based on traits and port syntax to it.Patrick Walton-118/+301
This is preparation for removing `@fn`. This does *not* use default methods yet, because I don't know whether they work. If they do, a forthcoming PR will use them. This also changes the precedence of `as`.
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-8/+8
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-21/+21
blk_check_mode, ty_field, ty_method}
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-5/+5
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-22new snapshotDaniel Micay-3/+0
2013-07-18Silence various warnings in bootstrap build.Felix S. Klock II-2/+0
2013-07-17test: Fix tests.Patrick Walton-1/+1
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-1/+3
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-45/+51
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-4/+6
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-6/+8
2013-07-14Make TLS keys actually take up spaceAlex Crichton-1/+1
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
2013-07-14Purge the last remnants of the old TLS apiAlex Crichton-13/+11
Closes #3273
2013-07-12auto merge of #7725 : msullivan/rust/default-methods, r=pcwaltonbors-3/+3
r?
2013-07-12auto merge of #7706 : sanxiyn/rust/qualification-lint, r=pcwaltonbors-0/+1
Fix #2551. Lint is off by default because I didn't bother to fix all of std and extra.
2013-07-11Get cross crate static default methods working. Closes #7569.Michael Sullivan-3/+3
2013-07-11Remove all external requirements of `@` from TLSAlex Crichton-1/+1
Closes #6004
2013-07-10Add a lint to detect unnecessarily qualified namesSeo Sanghyeon-0/+1
2013-07-09Rename local_data methods/types for less keystrokesAlex Crichton-2/+2
2013-07-08 Replaces the free-standing functions in f32, &c.Jens Nockert-2/+3
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
2013-07-07De-share trait_refJames Miller-1/+1
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
2013-07-07De-managed ast::PathJames Miller-3/+3
2013-07-04Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by ↵Huon Wilson-2/+2
iterators.
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-1/+1
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-29Remove mutability from unique boxes in the ASTAlex Crichton-1/+1
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-5/+5
for making them noncopyable.
2013-06-29Use more deriving(IterBytes) in libsyntax.Ben Blum-9/+0
2013-06-29Change taskgroup key type to fn:Copy in prep for noncopyable stack closures.Ben Blum-1/+1
2013-06-28librustc: Rewrite reachability and forbid duplicate methods in type ↵Patrick Walton-1/+1
implementations. This should allow fewer symbols to be exported.
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-0/+9
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-27Remove many shared pointersPhilipp Brüschweiler-3/+3
Mostly just low-haning fruit, i.e. function arguments that were @ even though & would work just as well. Reduces librustc.so size by 200k when compiling without -O, by 100k when compiling with -O.
2013-06-25auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatchbors-9/+7
Sets the stage for further cleanup (especially mass-slaughter of `@`)
2013-06-25remove the redundant `each` method from OptVecDaniel Micay-2/+2
2013-06-25great renaming propagation: syntaxCorey Richardson-9/+7
2013-06-23Add 'static mut' items to the languageAlex Crichton-1/+1
2013-06-23Parse and typecheck (not kindcheck) bounds on trait paths.Ben Blum-1/+1
2013-06-23vec: remove BaseIter implementationDaniel Micay-8/+8
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-1/+1
2013-06-16Add copies to type params with Copy boundNiko Matsakis-26/+26
2013-06-14add IteratorUtil to the preludeDaniel Micay-2/+0
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-2/+2
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-12Visitor refactoring: Step 1, couple (Env, vt<Env>) together in a tuple.Felix S. Klock II-30/+30