summary refs log tree commit diff
path: root/src/libsyntax/ast_util.rs
AgeCommit message (Collapse)AuthorLines
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-1/+1
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-28Removing unused importsAlex Crichton-1/+1
2013-03-22librustc: Remove `pure` from libsyntax and librustc.Patrick Walton-24/+23
2013-03-22syntax: replace uses of old deriving attribute with new oneAndrew Paseltiner-1/+1
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-1/+1
2013-03-11Implement vector destructuring from tailSeo Sanghyeon-4/+7
2013-03-07librustc: Remove record patterns from the compilerPatrick Walton-1/+1
2013-03-05core: convert vec::{last,last_opt} to return referencesErick Tryzelaar-1/+1
2013-03-05auto merge of #5212 : thestinger/rust/iter, r=graydonbors-1/+1
A small step towards fixing #2827
2013-03-04Remove unused imports throughout src/Alex Crichton-1/+0
2013-03-03replace option::iter with a BaseIter implDaniel Micay-1/+1
2013-03-02libsyntax: Remove `fn@`, `fn~`, and `fn&` from libsyntax. rs=defunPatrick Walton-53/+22
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-1/+1
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-1/+1
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'
2013-02-28Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-15/+28
2013-02-27auto merge of #5141 : nikomatsakis/rust/region-syntax-expl-lifetimes, ↵bors-16/+29
r=nikomatsakis Major changes are: - replace ~[ty_param] with Generics structure, which includes both OptVec<TyParam> and OptVec<Lifetime>; - the use of syntax::opt_vec to avoid allocation for empty lists; cc #4846 r? @graydon
2013-02-27Introduce lifetime declarations into the lists of type parameters.Niko Matsakis-16/+29
Major changes are: - replace ~[ty_param] with Generics structure, which includes both OptVec<TyParam> and OptVec<Lifetime>; - the use of syntax::opt_vec to avoid allocation for empty lists; cc #4846
2013-02-27Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-2/+2
2013-02-27librustc: Forbid `pub` or `priv` before trait implementationsPatrick Walton-2/+2
2013-02-25libsyntax: add some explicit copiesErick Tryzelaar-2/+2
2013-02-25libsyntax: progress on making syntax::visit vecs_implicitly_copyable-freeErick Tryzelaar-10/+10
2013-02-25libsyntax: convert visit to pass ty_params by referenceErick Tryzelaar-23/+22
2013-02-20librustc: Get rid of structural records save for front/test.rs.Luqman Aden-2/+2
2013-02-19libsyntax: make enum variants take refsErick Tryzelaar-2/+2
2013-02-17libsyntax: Update view_item_use/import to reflect actual usageLuqman Aden-2/+2
2013-02-15librustc: Stop parsing `impl Type : Trait` and fix several declarations that ↵Patrick Walton-2/+2
slipped through. r=tjc
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-3/+3
2013-02-04libsyntax: Add explicit self to ast_util. rs=explicit-selfingPatrick Walton-22/+22
2013-01-31test cases, cleanupJohn Clements-23/+1
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-3/+3
2013-01-31Finalize moves-based-on-type implementation.Niko Matsakis-6/+3
Changes: - Refactor move mode computation - Removes move mode arguments, unary move, capture clauses (though they still parse for backwards compatibility) - Simplify how moves are handled in trans - Fix a number of illegal copies that cropped up - Workaround for bug involving def-ids in params (see details below) Future work (I'll open bugs for these...): - Improve error messages for moves that are due to bindings - Add support for moving owned content like a.b.c to borrow check, test in trans (but I think it'll "just work") - Proper fix for def-ids in params Def ids in params: Move captures into a map instead of recomputing. This is a workaround for a larger bug having to do with the def-ids associated with ty_params, which are not always properly preserved when inlining. I am not sure of my preferred fix for the larger bug yet. This current fix removes the only code in trans that I know of which relies on ty_param def-ids, but feels fragile.
2013-01-30librustc: Remove legacy exports from the language. r=brsonPatrick Walton-86/+14
2013-01-29libsyntax: De-export a lot of libsyntax. rs=deëxportingPatrick Walton-56/+59
2013-01-29libstd: Remove "dual impls" from the language and enforce coherence rules. ↵Patrick Walton-1/+1
r=brson "Dual impls" are impls that are both type implementations and trait implementations. They can lead to ambiguity and so this patch removes them from the language. This also enforces coherence rules. Without this patch, records can implement traits not defined in the current crate. This patch fixes this, and updates all of rustc to adhere to the new enforcement. Most of this patch is fixing rustc to obey the coherence rules, which involves converting a bunch of records to structs.
2013-01-22Add is_mutbl field to def_argSeo Sanghyeon-1/+1
2013-01-22Change debuginfo to not use an option for the output type...Tim Chevalier-1/+3
...now without a random libuv change.
2013-01-22Revert "Clean up previous commit to not require an Option"Tim Chevalier-3/+1
I made a mistake and included some submodule weirdness. About to re-push the patch without that. This reverts commit 17ea548275364fac7cb5adbdc442010d1ba0d38d.
2013-01-22Clean up previous commit to not require an OptionTim Chevalier-1/+3
2013-01-20Convert many libsyntax records into structsErick Tryzelaar-2/+5
Specifically: ast_map::ctx ast_util::id_range diagnostic::{handler_t,codemap_t} auto_encode::field ext::base::{macro_def,syntax_expander_tt,syntax_expander_tt_item} ext::pipes::proto::next_state
2013-01-20convert the remaining ast record types into structsErick Tryzelaar-2/+5
These are: region,arg,fn_decl,method,_mod,foreign_mod, variant_arg,enum_def_,variant_,trait_ref.
2013-01-20convert ast::{ty_field_,ty_method} into a structErick Tryzelaar-7/+13
2013-01-20convert ast::ty into a structErick Tryzelaar-1/+1
2013-01-14Convert ast::{pat,field_pat,local_,arm} into structsErick Tryzelaar-3/+3
2013-01-14convert ast::blk_ into a structErick Tryzelaar-4/+12
2013-01-14Convert ast::def_id into a struct.Erick Tryzelaar-1/+3
2013-01-14Change ast::path into a struct.Erick Tryzelaar-2/+5
2013-01-11Make ast_util::path_name_i take a slice vector, eliminate a bad copyTim Chevalier-1/+1
2013-01-09A collection of refactorings that I found it hard/tiresome to divide:Niko Matsakis-4/+2
- Make `extern fn()` assignable to any closure type, rather than a subtype. - Remove unused int_ty_set and float_ty_set - Refactor variable unification and make it more DRY - Do fn sub/lub/glb on the level of fn_sig - Rename infer::to_str::ToStr to infer::to_str::InferStr - Capitalize names of various types - Correct hashing of FnMeta - Convert various records-of-fns into structs-of-fns. This is both eliminating use of deprecated features and more forwards compatible with fn reform. r=pcwalton
2013-01-09core: rename vec.filter to vec.filteredErick Tryzelaar-5/+6
2013-01-09syntax: convert ast::spanned into a structErick Tryzelaar-2/+2