summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
AgeCommit message (Collapse)AuthorLines
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
2013-12-17auto merge of #11005 : sanxiyn/rust/mut, r=alexcrichtonbors-4/+6
There is no `~mut T` and `[mut T]` any more.
2013-12-17Remove obsolete mutability from ast::TySeo Sanghyeon-4/+6
2013-12-16AST Visitor now walks enum discriminant expressionKiet Tran-0/+4
2013-12-12Remove fk_anonSeo Sanghyeon-6/+4
2013-12-11Make 'self lifetime illegal.Erik Price-3/+3
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-09Check the privacy of implemented traitsAlex Crichton-18/+25
This bug showed up because the visitor only visited the path of the implemented trait via walk_path (with no corresponding visit_path function). I have modified the visitor to use visit_path (which is now overridable), and the privacy visitor overrides this function and now properly checks for the privacy of all paths. Closes #10857
2013-12-06Check crate root for docs in missing_doc lint.Corey Richardson-0/+1
Because the root module isn't actually an item, we need to do some hackish handling of it. Closes #10656.
2013-12-01auto merge of #10750 : Blei/rust/no-at-struct-field, r=alexcrichtonbors-2/+2
2013-12-01ast: Remove one `@` and fix the falloutPhilipp Brüschweiler-2/+2
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-37/+37
critical enum sizes.
2013-11-28Register new snapshotsAlex Crichton-3/+3
2013-11-26Take &Pat in visit_patSeo Sanghyeon-1/+1
2013-11-22syntax: add a visit_ident method to the Visitor.Huon Wilson-3/+45
2013-11-21Remove ty_macSeo Sanghyeon-1/+1
2013-11-18Use '..' as slice wildcard in vectorsBrian Anderson-1/+1
2013-11-13make missing_doc lint respect the visibility rulesDavid Creswick-12/+20
Previously, the `exported_items` set created by the privacy pass was incomplete. Specifically, it did not include items that had been defined at a private path but then `pub use`d at a public path. This commit finds all crate exports during the privacy pass. Consequently, some code in the reachable pass and in rustdoc is no longer necessary. This commit then removes the separate `MissingDocLintVisitor` lint pass, opting to check missing_doc lint in the same pass as the other lint checkers using the visibility result computed by the privacy pass. Fixes #9777.
2013-11-08Create a new pass to resolve named lifetimes; rscope is not onlyNiko Matsakis-15/+88
used to indicate when anonymous regions (i.e., &T) are permitted
2013-10-29librustc: Implement the `proc` type as sugar for `~once fn` and `proc`Patrick Walton-0/+8
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
2013-10-28syntax: remove dead @mut Visitor impl (only used in tests).Huon Wilson-63/+0
Also, move some code only uses in the tests into the test module, and replace some needless @mut ~[] with plain ~[].
2013-10-21Add a feature flag for ASMLéo Testard-3/+7
2013-09-14Get rid of unused SimpleVisitor stuff.Lindsey Kuper-142/+1
2013-09-09auto merge of #9005 : alexcrichton/rust/rusty-log, r=brsonbors-4/+1
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.