summary refs log tree commit diff
path: root/src/libsyntax/ext/deriving/generic.rs
AgeCommit message (Collapse)AuthorLines
2013-09-25rustdoc: Change all code-blocks with a scriptAlex Crichton-22/+22
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g' find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g' find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-10auto merge of #9088 : nikomatsakis/rust/issue-6304-AST-tree-not-DAG, ↵bors-2/+2
r=catamorphism Ensures that each AST node has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-2/+2
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-10std::at_vec and vec: Unify build_sized, build_sized_opt into buildblake2-ppc-1/+1
These functions have very few users since they are mostly replaced by iterator-based constructions. Convert a few remaining users in-tree, and reduce the number of functions by basically renaming build_sized_opt to build, and removing the other two. This for both the vec and the at_vec versions.
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-59/+59
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-28/+28
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-29/+29
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-1/+1
Closes #5495
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-2/+2
cc #5898
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-1/+1
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-03remove obsolete `foreach` keywordDaniel Micay-13/+13
this has been replaced by `for`
2013-08-03auto merge of #8206 : omasanori/rust/blk-to-block, r=graydonbors-1/+1
Just for consistency.
2013-08-02replace `range` with an external iteratorDaniel Micay-4/+3
2013-08-02Replace 'blk' -> 'block' in AstBuilder.OGINO Masanori-1/+1
I didn't rename variables because they are local and are not parts of the public interfaces. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-11/+11
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-2/+3
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-10/+15
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-1/+1
2013-07-08Correct merge errorsNiko Matsakis-4/+4
2013-07-08syntax: Patch up code that was using irrefutable patterns incorrectlyNiko Matsakis-10/+18
2013-07-07De-share ast::TyJames Miller-3/+3
2013-07-07De-manage OptVec<TyParamBounds>James Miller-3/+2
2013-07-07De-manage LifetimeJames Miller-1/+1
2013-07-07De-managed ast::PathJames Miller-4/+4
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-5/+6
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-26Infer default static/Owned bounds for unbounded heap fns/traits (#7264)Ben Blum-1/+1
2013-06-25auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatchbors-5/+3
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-5/+3
2013-06-23Parse and typecheck (not kindcheck) bounds on trait paths.Ben Blum-1/+2
2013-06-23vec: remove BaseIter implementationDaniel Micay-3/+3
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-21vec: rm old_iter implementations, except BaseIterDaniel Micay-4/+4
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-5/+5
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+0
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-1/+1
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-09std: remove foldr and alli methods in vecHuon Wilson-4/+4
2013-06-08std: remove vec::each2 and vec::each2_mut in favour of iteratorsHuon Wilson-2/+3
2013-06-07syntax: move expand_generic_deriving to be a method on TraitDefHuon Wilson-29/+26
2013-06-07syntax: move functions from deriving/mod to deriving/generic.Huon Wilson-23/+198
These are now only called in generic and can be private. This includes manually inlining/merging some that are called once.
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-3/+6
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+3
2013-05-22librustc: Change `std` to `extra` throughout libsyntax and librustcPatrick Walton-1/+1
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22syntax/ext: convert all AstBuilder methods to a uniform syntax.Huon Wilson-29/+23
2013-05-22syntax/ext: migrate build.rs functions to AstBuilder methods.Huon Wilson-17/+17
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-26/+26
2013-05-21syntax/ext: remove the ~str dependence of the deriving code.Huon Wilson-8/+8
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-6/+6
2013-05-14rustc: rename ast::self_ty and related fields to explicit_selfErick Tryzelaar-17/+16
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-62/+63