about summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
AgeCommit message (Collapse)AuthorLines
2014-07-09syntax: doc comments all the thingsCorey Richardson-16/+16
2014-07-08carry self ident forward through re-parsingJohn Clements-2/+2
formerly, the self identifier was being discarded during parsing, which stymies hygiene. The best fix here seems to be to attach a self identifier to ExplicitSelf_, a change that rippled through the rest of the compiler, but without any obvious damage.
2014-07-03Simplify PatIdent to contain an Ident rather than a PathJohn Clements-2/+2
Rationale: for what appear to be historical reasons only, the PatIdent contains a Path rather than an Ident. This means that there are many places in the code where an ident is artificially promoted to a path, and---much more problematically--- a bunch of elements from a path are simply thrown away, which seems like an invitation to some really nasty bugs. This commit replaces the Path in a PatIdent with a SpannedIdent, which just contains an ident and a span.
2014-06-13libsyntax: Allow `+` to separate trait bounds from objects.Patrick Walton-1/+1
RFC #27. After a snapshot, the old syntax will be removed. This can break some code that looked like `foo as &Trait:Send`. Now you will need to write `foo as (&Trait+Send)`. Closes #12778. [breaking-change]
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-14/+14
2014-06-11syntax: Move the AST from @T to Gc<T>Alex Crichton-138/+140
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-09librustc: Implement sugar for the `FnMut` traitPatrick Walton-0/+13
2014-06-07Add visit_attribute to Visitor, use it for unused_attributeSteven Fackler-16/+46
The lint was missing a *lot* of cases previously.
2014-05-29auto merge of #14483 : ahmedcharles/rust/patbox, r=alexcrichtonbors-1/+1
2014-05-28Add AST node for pattern macrosKeegan McAllister-0/+1
2014-05-27Rename PatUniq to PatBox. Fixes part of #13910.Ahmed Charles-1/+1
2014-05-15syntax::visit: pub `walk_explicit_self` so impls can call it as defaults do.Felix S. Klock II-3/+13
drive-by: added some doc.
2014-05-14Removed unnecessary arguments for walk_* functionsMichael Darakananda-8/+4
2014-05-03Temporary patch to accept arbitrary lifetimes (behind feature gate) in bound ↵Niko Matsakis-1/+2
lists. This is needed to bootstrap fix for #5723.
2014-04-26syntax: ViewItemUse no longer contains multiple view paths.Kang Seonghoon-15/+13
it reflected the obsolete syntax `use a, b, c;` and did not make past the parser (though it was a non-fatal error so we can continue). this legacy affected many portions of rustc and rustdoc as well, so this commit cleans them up altogether.
2014-04-23Support unsized types with the `type` keywordNick Cameron-1/+1
2014-04-20Allow inheritance between structs.Nick Cameron-0/+4
No subtyping, no interaction with traits. Partially addresses #9912.
2014-04-11syntax: remove ast::Sigil.Eduard Burtescu-2/+13
2014-04-10Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalFn and ↵Kasey Carrothers-3/+3
updated associated variable and function names.
2014-04-04syntax: remove obsolete mutability from ExprVec and ExprRepeat.Eduard Burtescu-2/+2
2014-04-03syntax: Remove AbiSet, use one AbiAlex Crichton-2/+2
This change removes the AbiSet from the AST, converting all usage to have just one Abi value. The current scheme selects a relevant ABI given a list of ABIs based on the target architecture and how relevant each ABI is to that architecture. Instead of this mildly complicated scheme, only one ABI will be allowed in abi strings, and pseudo-abis will be created for special cases as necessary. For example the "system" abi exists for stdcall on win32 and C on win64. Closes #10049
2014-03-22Migrate all users of opt_vec to owned_slice, delete opt_vec.Huon Wilson-4/+3
syntax::opt_vec is now entirely unused, and so can go.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-15rustc: Remove compiler support for __log_level()Alex Crichton-1/+0
This commit removes all internal support for the previously used __log_level() expression. The logging subsystem was previously modified to not rely on this magical expression. This also removes the only other function to use the module_data map in trans, decl_gc_metadata. It appears that this is an ancient function from a GC only used long ago. This does not remove the crate map entirely, as libgreen still uses it to hook in to the event loop provided by libgreen.
2014-03-12Changed lists of lifetimes in ast and ty to use Vec instead of OptVec.Felix S. Klock II-2/+3
There is a broader revision (that does this across the board) pending in #12675, but that is awaiting the arrival of more data (to decide whether to keep OptVec alive by using a non-Vec internally). For this code, the representation of lifetime lists needs to be the same in both ScopeChain and in the ast and ty structures. So it seemed cleanest to just use `vec_ng::Vec`, now that it has a cheaper empty representation than the current `vec` code.
2014-03-07rename ast::ViewItemExternMod to ast::ViewItemExternCrate, and ↵Liigo Zhuang-1/+1
clean::ExternMod to clean::ExternCrate
2014-03-03syntax: make match arms store the expr directly.Huon Wilson-1/+1
Previously `ast::Arm` was always storing a single `ast::Expr` wrapped in an `ast::Block` (for historical reasons, AIUI), so we might as just store that expr directly. Closes #3085.
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-2/+2
2014-03-01rustc: implement a lint for publicly visible private types.Huon Wilson-5/+8
These are types that are in exported type signatures, but are not exported themselves, e.g. struct Foo { ... } pub fn bar() -> Foo { ... } will warn about the Foo. Such types are not listed in documentation, and cannot be named outside the crate in which they are declared, which is very user-unfriendly. cc #10573
2014-02-26Replace callee_id with information stored in method_map.Eduard Burtescu-6/+5
2014-02-14Removed the obsolete ast::CallSugar (previously used by `do`).Eduard Burtescu-2/+2
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-1/+1
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-2/+2
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-07Removed @self and @Trait.Eduard Burtescu-1/+1
2014-01-30Implement default type parameters in generics.Eduard Burtescu-1/+5
2014-01-29Removing support for the do syntax from libsyntax and librustc.Scott Lawrence-2/+1
Fixes #10815.
2014-01-27Demote self to an (almost) regular argument and remove the env param.Eduard Burtescu-4/+3
Fixes #10667 and closes #10259.
2014-01-15Issue #3511 - Rationalize temporary lifetimes.Niko Matsakis-0/+11
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way.
2014-01-14auto merge of #11485 : eddyb/rust/sweep-old-rust, r=nikomatsakisbors-1/+1
2014-01-13librustc: Remove `@` pointer patterns from the languagePatrick Walton-1/+0
2014-01-12Removed remnants of `@mut` and `~mut` from comments and the type system.Eduard Burtescu-1/+1
2014-01-10item_impl holds an Option<> to the trait ref, not a list of trait refs. ↵Nick Cameron-5/+6
Therefore, we should not iterate over it.
2014-01-09auto merge of #11055 : pcwalton/rust/placement-box, r=pcwaltonbors-0/+4
r? @nikomatsakis
2014-01-09librustc: Implement placement `box` for GC and unique pointers.Patrick Walton-0/+4
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-84/+80
2014-01-06Disowned the Visitor.Eduard Burtescu-97/+97
2014-01-03librustc: Remove `@mut` support from the parserPatrick Walton-2/+2
2014-01-01Remove `extern mod foo (name="bar")` syntax, closes #9543Florian Hahn-1/+1