about summary refs log tree commit diff
path: root/src/libsyntax/ext/deriving
AgeCommit message (Collapse)AuthorLines
2013-06-07syntax: move functions from deriving/mod to deriving/generic.Huon Wilson-277/+199
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-6/+10
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-18/+41
2013-05-31auto merge of #6851 : alexcrichton/rust/bugfixes, r=pcwaltonbors-957/+232
Closes #5090 by using the excellent new generic deriving code Promotes the unreachable code attribute to a lint attribute (instead of always being a warning) Fixes some edge cases when creating hashmaps/hashsets and also when consuming them. (fixes #5998)
2013-05-30Rewrite deriving(Decodable, Encodable)Alex Crichton-957/+232
Now it uses the generic deriving code and should in theory work in all cases.
2013-05-30Remove copy bindings from patterns.Niko Matsakis-3/+3
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-3/+15
2013-05-22syntax: Change syntax extensions to expand to `std::foo` instead of `core::foo`Patrick Walton-18/+18
2013-05-22librustc: Change `std` to `extra` throughout libsyntax and librustcPatrick Walton-11/+11
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-1/+23
to libextra
2013-05-22syntax/ext: convert all AstBuilder methods to a uniform syntax.Huon Wilson-434/+276
2013-05-22syntax/ext: migrate build.rs functions to AstBuilder methods.Huon Wilson-279/+245
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-98/+98
2013-05-21syntax/ext: remove the ~str dependence of the deriving code.Huon Wilson-79/+81
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-13/+13
2013-05-16syntax: use fmt! over + in deriving/cloneHuon Wilson-6/+6
2013-05-16syntax: implement #[deriving(DeepClone)]. Fixes #6514.Huon Wilson-6/+42
2013-05-15auto merge of #6502 : huonw/rust/no-auto-code, r=graydonbors-4/+326
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual auto_* code, leaving stubs to refer the user to the new syntax. Also, moves the useful contents of auto_encode.rs to more appropriate spots: tests and comments to deriving/encodable.rs, and the ExtCtxtMethods trait to build.rs (unused so far, but the method syntax might be nicer than using the mk_* fns in many instances).
2013-05-15auto merge of #6500 : kud1ing/rust/cleanup, r=bstriebors-27/+0
Fixes #6445
2013-05-16syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].Huon Wilson-4/+326
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
2013-05-15remove deriving_eq, deriving_iter_bytes, deriving_clone (deprecated in 0.6)Lenny222-27/+0
2013-05-14rustc: rename ast::self_ty and related fields to explicit_selfErick Tryzelaar-30/+29
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-86/+88
2013-05-12librustc: Make `self` and `static` into keywordsPatrick Walton-12/+7
2013-05-10auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwaltonbors-11/+15
Closes #6183. The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout. The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
2013-05-10Fix deriving(IterBytes) to use the new for-loop protocolAlex Crichton-11/+15
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-90/+90
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-08libcore: Fix more merge fallout.Patrick Walton-5/+10
2013-05-08librustc: Fix merge fallout.Patrick Walton-8/+4
2013-05-08librustc: Remove mutable fields from the language.Patrick Walton-3/+3
They're still parsed though, to get through bootstrapping.
2013-05-07libsyntax: add #[deriving(Rand, ToStr)].Huon Wilson-0/+196
The former fills each field of a struct or enum variant with a random value (and picks a random enum variant). The latter makes the .to_str method have the same output as fmt!("%?", ..).
2013-05-07libsyntax: convert #[deriving(IterBytes)] to generic derivingHuon Wilson-223/+61
2013-05-07libsyntax: extend generic deriving code to handle almost all possible traits.Huon Wilson-529/+877
This adds support for static methods, and arguments of most types, traits with type parameters, methods with type parameters (and lifetimes for both), as well as making the code more robust to support deriving on types with lifetimes (i.e. 'self).
2013-05-02librustc: Update the serializer to work properly with INHTWAMA, removing ↵Patrick Walton-13/+78
mutable fields in the process
2013-04-27only use #[no_core] in libcoreDaniel Micay-18/+0
2013-04-25Rename vec::mod2 to vec::mod_zipCorey Richardson-1/+1
2013-04-19syntax: de-mode and prepare for de-modeing rustcAlex Crichton-3/+3
2013-04-12libsyntax: another fix for deriving on windows.Huon Wilson-2/+1
2013-04-12libsyntax: (maybe) fix deriving(TotalOrd) on windowsHuon Wilson-6/+6
2013-04-12libsyntax: short-circuit on non-matching variants in deriving code.Huon Wilson-81/+151
Allow a deriving instance using the generic code to short-circuit for any non-matching enum variants (grouping them all into a _ match), reducing the number of arms required. Use this to speed up the Eq & TotalEq implementations.
2013-04-12libsyntax: derive Clone, Eq, TotalEq, Ord, TotalOrd with the new generic ↵Huon Wilson-761/+411
deriving code. Closes #4269, #5588 and #5589.
2013-04-12libsyntax: abstract most of the deriving boilerplate into a simpler(r) ↵Huon Wilson-42/+915
interface. Pulls out many of the common patterns from the Eq and Clone deriving code (and invents a few of its own), so that deriving instances are very easy to write for a certain class of traits. (Basically, those which don't have parameters and where all methods only take arguments of type `&Self` and return either `Self` or types with no parameters.)
2013-04-10syntax: add support for #[deriving(Decodable)]Erick Tryzelaar-0/+457
2013-04-10syntax: add support for #[deriving(Encodable)]Erick Tryzelaar-0/+391
2013-04-10syntax: Simplify deriving to handle classes that take generics, like EncodableErick Tryzelaar-34/+28
2013-04-10syntax: update a deriving error message to use the new syntaxErick Tryzelaar-5/+3
2013-04-10path -> PathJohn Clements-1/+1
2013-04-05Refactor so that references to traits are not represented using a type with aNiko Matsakis-3/+3
bare function store (which is not in fact a kind of value) but rather ty::TraitRef. Removes many uses of fail!() and other telltale signs of type-semantic mismatch. cc #4183 (not a fix, but related)
2013-03-31Fix warningsBrian Anderson-1/+1
2013-03-28Removing unused importsAlex Crichton-31/+10