about summary refs log tree commit diff
path: root/src/libsyntax/ast_util.rs
AgeCommit message (Collapse)AuthorLines
2012-07-30Frontend bits for #2317, general const-expr classification.Graydon Hoare-0/+3
2012-07-27rustc: Use coherence for operator overloading.Patrick Walton-0/+16
The only use of the old-style impls is now placement new.
2012-07-27Correctly forbid upvars in nested impls, traits and classesTim Chevalier-1/+2
Previously, resolve was allowing impls, traits or classes that were nested within a fn to refer to upvars, as well as referring to type parameters bound by the fn. Fixing this required adding a new kind of def: def_typaram_binder, which can refer to any of an impl, trait or class that has bound ty params. resolve uses this to enforce that methods can refer to their parent item's type parameters, but not to outer items' type parameters; other stages ignore it. I also made sure that impl, trait and class methods get checked inside a MethodRibKind thing so as to forbid upvars, and changed the definition of MethodRibKind so that its second argument is an optional node_id (so that required trait method signatures can be checked with a MethodRibKind as well).
2012-07-26rustc: Fix cross-crate max/min-class-style constructorsPatrick Walton-1/+1
2012-07-19Revert "accept naked exprs with commas in pattern arms" due to ↵Patrick Walton-7/+0
pretty-printing failures This reverts commit f712b2d76b1077a2241916cc3269aa1d83ce3088. In alt arms, the parser needs to do a little lookahead to determine whether it's looking at a record literal or a block. Also there are some indentation issues in the expected source.
2012-07-18accept naked exprs with commas in pattern armsNiko Matsakis-0/+7
pretty printing will use them, but indentation is slightly off if the expr is long
2012-07-17rustc: Implement and enforce instance coherencePatrick Walton-1/+7
2012-07-17Support attributes on class ctors and dtorsTim Chevalier-2/+2
Closes #2660
2012-07-14remove typestate from code, tests, and docsNiko Matsakis-14/+2
2012-07-14Move the world over to using the new style string literals and types. Closes ↵Michael Sullivan-40/+40
#2907.
2012-07-13Support prefix notation for vstore strings. Closes #2906.Michael Sullivan-1/+1
2012-07-13Front-end support for default impls in traits.Lindsey Kuper-0/+3
2012-07-12Obliterate the callee_id hackTim Chevalier-12/+1
Exprs that could be applications of overloaded operators (expr_unary, expr_binary, expr_index) relied on the previous node ID being "reserved" to carry extra typechecking info. This was incredibly error-prone. Fixed it; now all exprs have two node IDs (which will be wasted in some cases; future work could make this an option instead if the extra int field ends up being a performance problem). Closes #2804
2012-07-11infer when types are region parameterized rather than requiring /&Niko Matsakis-2/+5
- removes various fields from various variants in the AST - also update tests not to use this notation
2012-07-04convert doc-attributes to doc-comments using ↵Gareth Daniel Smith-1/+1
./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-03Revert "Remove rule requiring non-nil block-style statements to be ↵Brian Anderson-0/+1
semi-terminated" This reverts commit 0f5eaef5fb2443acd3ea67250c953839c3d04d38.
2012-07-03Remove rule requiring non-nil block-style statements to be semi-terminatedBrian Anderson-1/+0
This is a subtle rule that no longer seems to be required.
2012-07-02rustc: Implement a new resolve pass behind a compile flagPatrick Walton-0/+7
2012-07-01Convert to new closure syntaxBrian Anderson-22/+28
2012-06-30Eliminate usages of old sugared call syntaxBrian Anderson-9/+9
2012-06-29Switch the compiler over to using ~[] notation instead of []/~. Closes #2759.Michael Sullivan-14/+14
2012-06-26Change 'native' and 'crust' to 'extern'.Graydon Hoare-5/+5
This comes with a terminology change. All linkage-symbols are 'extern' now, including rust syms in other crates. Some extern ABIs are merely "foreign". The term "native" is retired, not clear/useful. What was "crust" is now "extern" applied to a _definition_. This is a bit of an overloading, but should be unambiguous: it means that the definition should be made available to some non-rust ABI.
2012-06-26Getting rid of lots more vector +=. (issue #2719)Eric Holk-6/+6
2012-06-25Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725.Michael Sullivan-15/+16
2012-06-24Remove resourcesTim Chevalier-3/+1
Also fixed shapes for classes with dtors, as well as handling offsets for classes with dtors correctly in take glue. Closes #2485
2012-06-21Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.Graydon Hoare-10/+10
2012-06-21Move vector addition out of trans and into libcore.Eric Holk-4/+13
2012-06-16Re-fix whitespaceTim Chevalier-1/+1
2012-06-16Revert "Reference and whitespace fixes."Tim Chevalier-1/+1
This reverts commit 52f1904ddde95fb7d8e654b4cc78a4f162385275.
2012-06-15Reference and whitespace fixes.Eric Holk-1/+1
2012-06-15id_visitor should handle expr_index and expr_assign_op as well.Eric Holk-2/+3
2012-06-15Handle index expressions' callee IDs correctlyTim Chevalier-1/+1
Some code that handles unary and binary exprs' callee IDs was forgetting to handle the index expr case (since calls to user-defined index operators also have callee IDs). This was manifesting as an ICE in trans because when monomorphizing a function that had one of these operators in it (an index into a dvec, in the test case), the callee ID would be unbound to a type. Fixed it. Closes #2631.
2012-06-14Comments only: annotate FIXMEsTim Chevalier-1/+1
2012-06-13Box AST identsBrian Anderson-2/+5
2012-06-12Handle class destructors correctly in metadataTim Chevalier-0/+5
This allows destructors to be inlined, which is necessary since classes can have both ty params and destructors.
2012-06-07syntax: Remove a bunch of implicit copiesPatrick Walton-11/+15
2012-06-06add pure annotations in ast_utilNiko Matsakis-14/+14
2012-06-04syntax: Make span functions take args by copy. Eliminate some copy warningsBrian Anderson-3/+3
2012-05-31Rename librustsyntax to libsyntaxKevin Cantu-0/+554
Per issue #2418.