about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-04-28reindent in parserJohn Clements-4/+4
2013-04-28remove unnecessary functionJohn Clements-7/+1
2013-04-28simplify, based on invariant that items_allowed != foreign_items_allowedJohn Clements-13/+7
2013-04-28adding parse_pathJohn Clements-19/+34
2013-04-28comments, helper function for tests, more informative error messageJohn Clements-2/+17
2013-04-28refactor parse_fn_declJohn Clements-5/+6
2013-04-28parser comments onlyJohn Clements-0/+6
2013-04-28refactoring mod.rsJohn Clements-161/+435
2013-04-28change stage1,stage2,stage2 into not(stage0)John Clements-6/+2
With luck, this will allow rust to compile itself without --cfg flags again...
2013-04-27only use #[no_core] in libcoreDaniel Micay-174/+0
2013-04-26auto merge of #6059 : Kimundi/rust/nice-fail, r=pcwaltonbors-17/+34
r? @brson Unwinding through macros now happens as a call to the trait function `FailWithCause::fail_with()`, which consumes self, allowing to use a more generic failure object in the future.
2013-04-25Made fail! and assert! accept both &'static str and ~str, as well as a fmt! ↵Marvin Löbel-17/+34
like format list. Unwinding through macros now happens as a call to the trait function `FailWithCause::fail_with()`, which consumes self, allowing to use a more generic failure object in the future.
2013-04-25Rename vec::mod2 to vec::mod_zipCorey Richardson-3/+3
2013-04-24Merge remote-tracking branch 'brson/io'Brian Anderson-1/+1
Conflicts: src/libcore/rt/uvio.rs
2013-04-24Remove needless FIXME. Fixes #2811.Niko Matsakis-2/+0
2013-04-23Merge remote-tracking branch 'brson/io'Brian Anderson-1/+1
This also reverts some changes to TLS that were leaking memory. Conflicts: src/libcore/rt/uv/net.rs src/libcore/task/local_data_priv.rs src/libcore/unstable/lang.rs
2013-04-22auto merge of #6017 : brson/rust/revert-span-merge, r=catamorphismbors-147/+13
This reverts commit 6030e3982a52c8d9ede225f992088bb75fba4ef1. This reorders error messages in ways that aren't intended. A more satisfying solution will require an interface that allows diagnostics to be grouped together, so that messages that logically belong together aren't reordered. #4569
2013-04-22auto merge of #6007 : pcwalton/rust/use-mod, r=brsonbors-26/+13
r? @brson
2013-04-22Revert "Errors with the same span print the span once"Brian Anderson-147/+13
This reverts commit 6030e3982a52c8d9ede225f992088bb75fba4ef1.
2013-04-22auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydonbors-27/+29
Closes #3083. This takes a similar approach to #5797 where a set is present on the `tcx` of used mutable definitions. Everything is by default warned about, and analyses must explicitly add mutable definitions to this set so they're not warned about. Most of this was pretty straightforward, although there was one caveat that I ran into when implementing it. Apparently when the old modes are used (or maybe `legacy_modes`, I'm not sure) some different code paths are taken to cause spurious warnings to be issued which shouldn't be issued. I'm not really sure how modes even worked, so I was having a lot of trouble tracking this down. I figured that because they're a legacy thing that I'd just de-mode the compiler so that the warnings wouldn't be a problem anymore (or at least for the compiler). Other than that, the entire compiler compiles without warnings of unused mutable variables. To prevent bad warnings, #5965 should be landed (which in turn is waiting on #5963) before landing this. I figured I'd stick it out for review anyway though.
2013-04-22Make conditions public. #6009Brian Anderson-1/+1
2013-04-22librustc: Remove `use mod` from the languagePatrick Walton-26/+13
2013-04-22Rename Div operator trait to Quot and Modulo operator trait to RemBrendan Zabarauskas-8/+8
2013-04-20syntax: remove unused 'mut' variablesAlex Crichton-27/+29
2013-04-20auto merge of #5965 : alexcrichton/rust/issue-4364, r=pcwaltonbors-364/+363
This closes #4364. I came into rust after modes had begun to be phased out, so I'm not exactly sure what they all did. My strategy was basically to turn on the compilation warnings and then when everything compiles and passes all the tests it's all good. In most cases, I just dropped the mode, but in others I converted things to use `&` pointers when otherwise a move would happen. This depends on #5963. When running the tests, everything passed except for a few compile-fail tests. These tests leaked memory, causing the task to abort differently. By suppressing the ICE from #5963, no leaks happen and the tests all pass. I would have looked into where the leaks were coming from, but I wasn't sure where or how to debug them (I found `RUSTRT_TRACK_ALLOCATIONS`, but it wasn't all that useful).
2013-04-19auto merge of #5945 : graydon/rust/fix-unicode-tables, r=pcwaltonbors-2/+2
This switches the unicode functions in core to use static character-range tables and a binary search helper rather than open-coded switch statements. It adds about 50k of read only data to the libcore binary but cuts out a similar amount of compiled IR. Would have done it this way in the first place but we didn't have structured statics for a long time.
2013-04-19syntax: de-mode and prepare for de-modeing rustcAlex Crichton-364/+363
2013-04-19librustc: Fix botched merge. rs=mergePatrick Walton-4/+4
2013-04-19librustc: Optimize metadata::decoder::item_name.Patrick Walton-0/+31
2013-04-18core: replace unicode match exprs with bsearch in const arrays, minor perf win.Graydon Hoare-2/+2
2013-04-18Errors with the same span print the span onceYoungmin Yoo-13/+147
2013-04-16add self.token_to_str and is_any_keyword convenience abstractionsJohn Clements-25/+55
2013-04-16added MTWT functionsJohn Clements-66/+462
2013-04-16better error message on failure to parse typeJohn Clements-1/+2
2013-04-16move interner_key macroJohn Clements-22/+22
2013-04-16libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no ↵Huon Wilson-40/+44
pub mod or pub fn).
2013-04-14syntax: remove unnecessary unsafe blocks/functionsAlex Crichton-6/+4
2013-04-12auto merge of #5827 : ↵bors-9/+28
nikomatsakis/rust/issue-5656-change-meaning-of-borrowed-self, r=pcwalton See #5656 for details. r? @pcwalton
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-11auto merge of #5819 : erickt/rust/incoming, r=ericktbors-67/+1030
Good morning, This first patch series adds support for `#[deriving(Decodable, Encodable)]`, but does not yet remove `#[auto_encode]` and `#[auto_decode]`. I need a snapshot to remove the old code. Along the way it also extends support for tuple structs and struct enum variants. Also, it includes a minor fix to the pretty printer. We decided a while ago to use 4 spaces to indent a match arm instead of 2. This updates the pretty printer to reflect that.
2013-04-10Issue #5656: Make &self not mean "&'self self"Niko Matsakis-9/+28
Fixes #5656. Fixes #5541.
2013-04-10syntax: add {read,emit}_enum_struct_variant{,_field}Erick Tryzelaar-0/+8
2013-04-10std: add serialize {read,emit}_tuple{,_arg,_struct,_struct_arg}Erick Tryzelaar-0/+14
2013-04-10syntax: add support for #[deriving(Decodable)]Erick Tryzelaar-7/+510
2013-04-10syntax: add support for #[deriving(Encodable)]Erick Tryzelaar-8/+455
2013-04-10syntax: Simplify deriving to handle classes that take generics, like EncodableErick Tryzelaar-34/+28