summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
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-554/+936
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-06Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-6/+6
2013-05-06refinement to technique used to not run regionckNiko Matsakis-1/+7
2013-05-06Add assert_approx_eq! macroBrendan Zabarauskas-0/+36
2013-05-05Fix two more write guard failuresNiko Matsakis-1/+1
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-708/+456
Conflicts: src/libcore/core.rc src/libcore/hashmap.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/num/float.rs src/libcore/num/int-template.rs src/libcore/num/num.rs src/libcore/num/strconv.rs src/libcore/num/uint-template.rs src/libcore/ops.rs src/libcore/os.rs src/libcore/prelude.rs src/libcore/rt/mod.rs src/libcore/unstable/lang.rs src/librustc/driver/session.rs src/librustc/middle/astencode.rs src/librustc/middle/borrowck/check_loans.rs src/librustc/middle/borrowck/gather_loans.rs src/librustc/middle/borrowck/loan.rs src/librustc/middle/borrowck/preserve.rs src/librustc/middle/liveness.rs src/librustc/middle/mem_categorization.rs src/librustc/middle/region.rs src/librustc/middle/trans/base.rs src/librustc/middle/trans/inline.rs src/librustc/middle/trans/reachable.rs src/librustc/middle/typeck/check/_match.rs src/librustc/middle/typeck/check/regionck.rs src/librustc/util/ppaux.rs src/libstd/arena.rs src/libstd/ebml.rs src/libstd/json.rs src/libstd/serialize.rs src/libstd/std.rc src/libsyntax/ast_map.rs src/libsyntax/parse/parser.rs src/test/compile-fail/borrowck-uniq-via-box.rs src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs src/test/run-pass/borrowck-nested-calls.rs
2013-05-05auto merge of #6208 : sanxiyn/rust/accurate-span, r=sanxiynbors-6/+6
2013-05-06Fix span testsSeo Sanghyeon-2/+2
2013-05-05Allow non-literal static range pattern for match armsJeong YunWon-2/+8
Fix unintended error problem of: static s: int = 1; static e: int = 42; fn main() { match 7 { s..e => (), ^~ error: expected `=>` but found `..` _ => (), } }
2013-05-04Register snapshotsBrian Anderson-66/+0
2013-05-04auto merge of #6230 : thestinger/rust/whitespace, r=catamorphismbors-7/+0
I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).
2013-05-03auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphismbors-4/+3
2013-05-03auto merge of #6219 : dotdash/rust/fmt, r=graydonbors-4/+2
Only the first portion has to be owned, as it acts as the buffer for the constructed string. The remaining strings can be static.
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-7/+0
2013-05-03syntax: Warning policeTim Chevalier-4/+3
2013-05-03rustc: Handle struct patterns where the expected type is an enumTim Chevalier-3/+3
Previously, rustc would ICE if you matched on an enum-typed thing with a structure pattern. Error out correctly.
2013-05-03auto merge of #6046 : brson/rust/io, r=graydonbors-1/+1
r? @pcwalton Sorry this is so big, and sorry the first commit is just titled 'wip'. Some interesting bits * [LocalServices](https://github.com/brson/rust/commit/f9069baa70ea78117f2087fe6e359fb2ea0ae16a) - This is the set of runtime capabilities that *all* Rust code should expect access to, including the local heap, GC, logging, unwinding. * [impl Reader, etc. for Option](https://github.com/brson/rust/commit/5fbb0949a53a6ac51c6d9b187ef4c464e52ae536) - Constructors like `File::open` return Option<FileStream>. This lets you write I/O code without ever unwrapping an option. This series adds a lot of [documentation](https://github.com/brson/rust/blob/io/src/libcore/rt/io/mod.rs#L11) to `core::rt::io`.
2013-05-03Avoid needless creation of unique strings in fmt!()Björn Steinbrink-4/+2
Only the first portion has to be owned, as it acts as the buffer for the constructed string. The remaining strings can be static.
2013-05-02Merge remote-tracking branch 'brson/io' into incomingBrian Anderson-1/+1
Conflicts: mk/rt.mk src/libcore/run.rs
2013-05-02librustc: Update the serializer to work properly with INHTWAMA, removing ↵Patrick Walton-121/+332
mutable fields in the process
2013-05-02fix numerous dynamic borrow failuresNiko Matsakis-1/+1
2013-05-03More accurate spansSeo Sanghyeon-4/+4
2013-05-03Use static stringsJeong YunWon-39/+32
2013-05-02More cases of [cfg(test)] instead of [test].Felix S. Klock II-1/+1
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-202/+0
2013-05-01syntax: fix up dynamic borrow errors in libsyntaxNiko Matsakis-10/+10
2013-05-01auto merge of #6148 : erickt/rust/remove-drop, r=pcwaltonbors-313/+115
The drop block has been deprecated for quite some time. This patch series removes support for parsing it and all the related machinery that made drop work. As a side feature of all this, I also added the ability to annote fields in structs. This allows comments to be properly associated with an individual field. However, I didn't update `rustdoc` to integrate these comment blocks into the documentation it generates.
2013-05-01remove some warningsErick Tryzelaar-2/+2
2013-05-01syntax: remove parse::token::{dtor,literally_dtor}Erick Tryzelaar-75/+70
2013-05-01allow parsing attributes on struct fieldsErick Tryzelaar-17/+31
2013-05-01rustc: remove the rest of dropErick Tryzelaar-148/+5
Removes: ast::struct_def::dtor syntax::ast::ii_dtor syntax::visit::fk_dtor syntax::ast_map::node_dtor syntax:struct_dtor
2013-05-01syntax: remove parsing destructorsErick Tryzelaar-78/+14
2013-05-01rustc: print out filename/line-number when a borrow failsNiko Matsakis-1/+1
2013-05-01Revert rename of Div to QuotBrendan Zabarauskas-7/+7
2013-04-30Merge remote-tracking branch 'brson/io'Brian Anderson-1/+1
Conflicts: src/libcore/task/local_data_priv.rs
2013-04-30allover: numerous unused muts etcNiko Matsakis-3/+2
2013-04-30new borrow checker (mass squash)Niko Matsakis-111/+141
2013-04-30adapt to snapshotNiko Matsakis-20/+0
2013-04-29libstd: Fix merge fallout.Patrick Walton-16/+14
2013-04-29librustc: Forbid type implementations on typedefs.Patrick Walton-2/+49
2013-04-29librustc: Change labels to use the lifetime notation `'`.Patrick Walton-29/+68
2013-04-29test: Fix tests.Patrick Walton-1/+3
2013-04-29librustc: Remove the concept of modes from the compiler.Patrick Walton-99/+52
This commit does not remove `ty::arg`, although that should be possible to do now.
2013-04-29librustc: Remove `ptr::addr_of`.Patrick Walton-5/+3
2013-04-29auto merge of #6083 : jbclements/rust/parser-cleanup, r=jbclementsbors-542/+870
r? @pcwalton A month's worth of parser cleanup here. Much of this is new comments and renaming. A number of these commits also remove unneeded code. Probably the biggest refactor here is splitting "parse_item_or_view_item" into two functions; it turns out that the only overlap between items in foreign modules and items in regular modules was macros, so this refactor should make things substantially easier for future maintenance.
2013-04-28make way for a new iter moduleDaniel Micay-21/+22
2013-04-28parser commentsJohn Clements-12/+82
2013-04-28s/one_tuple/trailing_comma (more accurate name)John Clements-3/+3