Commit graph

16525 commits

Author SHA1 Message Date
Erick Tryzelaar 2e0b363a7f syntax: Remove dead code from the parser 2013-03-27 07:04:15 -07:00
Erick Tryzelaar b26ae289d0 syntax: Fix parsing global generics (Closes #5572) 2013-03-27 07:04:14 -07:00
Erick Tryzelaar 4e9a63ff91 std: add tests for decoding json enums 2013-03-27 07:04:14 -07:00
Erick Tryzelaar 4d6dcefcbb std: Decode::read_enum_variant should pass in the variant names
Because the json::Decoder uses the string variant name, we need a
way to correlate the string to the enum index. This passes in a
static &[&str] to read_enum_variant, which allows the json::Decoder
to know which branch it's trying to process.
2013-03-27 07:04:13 -07:00
Erick Tryzelaar 478e4498b7 std: add option type directly to serialize::{En,De}code 2013-03-27 07:04:12 -07:00
Erick Tryzelaar 4d995e66a2 std: change default json enum encoder to use strings or a flat vec 2013-03-27 07:04:12 -07:00
Erick Tryzelaar b10b8c3ee4 std: Add tests for json decoding options 2013-03-27 07:04:11 -07:00
Erick Tryzelaar c9188c8301 std: fix json PrettyEncoder and add tests 2013-03-27 07:04:10 -07:00
Erick Tryzelaar 6cf99fa54a std: change fail_unless to assert_eq in json.rs 2013-03-27 07:04:09 -07:00
Erick Tryzelaar 89fc95885f std: serializing Options should use the right case 2013-03-27 07:02:59 -07:00
Erick Tryzelaar b290863be6 std: clean json test imports 2013-03-27 07:01:50 -07:00
Erick Tryzelaar bd77e9433f syntax: pass some values around by reference 2013-03-27 07:01:45 -07:00
Erick Tryzelaar 2f1ab3a7fa syntax: Add new values that can be used with the quasiquoter 2013-03-27 06:49:39 -07:00
Patrick Walton 2888563510 test: Fix botched error message in compile-fail test 2013-03-26 23:31:56 -07:00
Patrick Walton b07b36bbf3 test: Fix tests 2013-03-26 22:45:22 -07:00
Patrick Walton f41a510631 librustc: Remove obsolete syntax 2013-03-26 21:30:18 -07:00
Patrick Walton 0a4d0f37ca librustc: Enforce that extern mod directives come first, then use directives, then items.
Resolve them in this order as well.
2013-03-26 21:30:17 -07:00
Patrick Walton 8b56a8380b librustc: Modify all code to use new lifetime binder syntax 2013-03-26 21:30:17 -07:00
Patrick Walton 15688eaf28 librustc: Require explicit lifetime binders 2013-03-26 21:29:35 -07:00
Patrick Walton 3b2fcf9f59 librustc: Fix bug with newtype structs containing dtors 2013-03-26 21:29:35 -07:00
Patrick Walton a376f46862 librustc: Stop parsing [T * N]. 2013-03-26 21:29:35 -07:00
Patrick Walton 142dbd65da librustc: Remove all uses of the old [T * N] fixed-length vector syntax 2013-03-26 21:29:34 -07:00
Patrick Walton 46d4cc12d1 libsyntax: Stop parsing [const T]. 2013-03-26 21:29:34 -07:00
Patrick Walton 0d52b22e7b libcore: Change [const T] to const [T] everywhere 2013-03-26 21:29:33 -07:00
bors 5df1aaab98 auto merge of #5414 : thestinger/rust/option, r=catamorphism 2013-03-26 20:18:54 -07:00
Daniel Micay 34c5a09ce3 option: rm functions that duplicate methods 2013-03-26 22:44:40 -04:00
bors 4cb5854d88 auto merge of #5560 : brson/rust/relnotes, r=brson
r?
2013-03-26 19:24:53 -07:00
bors 5011d05db2 auto merge of #5547 : catamorphism/rust/issue-4898, r=catamorphism 2013-03-26 17:54:53 -07:00
bors fa82b9af2a auto merge of #5523 : alexcrichton/rust/less-oldmap, r=thestinger
I started out just removing a few instances of `HashMap` throughout rustc, but it ended up snowballing to remove the entire thing. Most uses translated to just using `@mut LinearMap` instead of `HashMap`, although I tried where possible to drop the `@mut` modifier. This ended up working out some of the time, but definitely not in the major use cases.

Things got kinda weird in some cases like:

* https://github.com/alexcrichton/rust/compare/mozilla:a56ec8c1342453a88be79e192a11501844375d40...alexcrichton:621b63300358cacad088ddd7f78180f29c40e66e#L39R1587
* https://github.com/alexcrichton/rust/compare/mozilla:a56ec8c1342453a88be79e192a11501844375d40...alexcrichton:621b63300358cacad088ddd7f78180f29c40e66e#L61R3760
* https://github.com/alexcrichton/rust/compare/mozilla:a56ec8c1342453a88be79e192a11501844375d40...alexcrichton:621b63300358cacad088ddd7f78180f29c40e66e#L71R917
* https://github.com/alexcrichton/rust/compare/mozilla:a56ec8c1342453a88be79e192a11501844375d40...alexcrichton:621b63300358cacad088ddd7f78180f29c40e66e#L91R127

I tried to tag them all with bugs which I thought would make them less weird, but I may have the wrong bug in a few places. These cases only came up when I tried to pass around `&mut LinearMap` instead of an `@mut LinearMap`.

I also ran into a few bugs when migrating to `LinearMap`, one of which is #5521. There's another set of bugs which a00d779042fb8753c716e07b4f1aac0d5ab7bf66 addresses (all marked with `XXX`). I have a feeling they're all the same bug, but all I've been able is to reproduce them. I tried to whittle down the test cases and try to get some input which causes a failure, but I've been unable to do so. All I know is that it's vaguely related to `*T` pointers being used as `&*T` (return value of `find`). I'm not able to open a very descriptive issue, but I'll do so if there seems no other better route.

I realize this is a very large pull request, so if it'd be better to split this up into multiple segments I'd be more than willing to do so. So far the tests all pass locally, although I'm sure bors will turn something up. I also don't mind keeping this up to date with rebasing. This maybe should wait until after 0.6 because it is a fairly large change...
2013-03-26 16:21:59 -07:00
Alex Crichton d69108d8f7 std: Remove the oldmap module 2013-03-26 19:21:05 -04:00
Alex Crichton dbe1354321 Move ast_map::map to LinearMap 2013-03-26 19:21:05 -04:00
Alex Crichton b53057f49d test: Remove uses of oldmap::HashMap 2013-03-26 19:21:04 -04:00
Alex Crichton 17459d0bd3 rustc: Purge of HashMap, fixing segfaulting cases
Various FIXME comments added around to denote copies which when removed cause
the compiler to segfault at some point before stage2. None of these copies
should even be necessary.
2013-03-26 19:21:04 -04:00
Alex Crichton 6f812fef1b rustc: Remove uses of oldmap::HashMap 2013-03-26 19:21:04 -04:00
Alex Crichton 31f6e64324 doc: Remove mentions of oldmap::HashMap 2013-03-26 19:20:02 -04:00
Alex Crichton e4c3d805a4 syntax: Removing uses of HashMap 2013-03-26 19:20:02 -04:00
Alex Crichton fa7772893a Remove unused imports throughout 2013-03-26 19:20:02 -04:00
Tim Chevalier 3ba7e041f1 core: As per #4898, finish impls for one-tuples 2013-03-26 16:08:05 -07:00
bors 3d588c5286 auto merge of #5555 : Kimundi/rust/str-dealloc-3, r=catamorphism
- Most functions that used to return `~[~str]` for a list of substrings got turned into iterators over `&str` slices
- Some cleanup of apis, docs and code layout
2013-03-26 15:07:07 -07:00
bors 3f7c74d022 auto merge of #5467 : nikomatsakis/rust/issues-3888-4036-4492-cannot-encode-region-variables, r=nikomatsakis
The basic problem was that vtables were not being resolved.  The fix uncovered another issue, which was that the syntax extensions were not creating method calls properly and were relying on outdated code in typeck, so I fixed that too.  

Resolves issues #3888, #4036, #4492.

r? @catamorphism
2013-03-26 13:22:11 -07:00
Brian Anderson 110a273e0d Add missing authors 2013-03-26 12:40:59 -07:00
Niko Matsakis 3ca7c225e5 Stop writing directly to the final type/method/vtable sidetables from astconv
and from typeck, which is verboten.  We are supposed to write inference results
into the FnCtxt and then these get copied over in writeback.  Add assertions
that no inference by-products are added to this table.

Fixes #3888
Fixes #4036
Fixes #4492
2013-03-26 15:39:12 -04:00
Brian Anderson 8cb165a764 Update 0.6 release notes 2013-03-26 12:28:04 -07:00
Brian Anderson f792d177a4 core: Hide GC docs 2013-03-26 12:27:47 -07:00
Niko Matsakis 6f2783d515 Add various debug statements to trans that I used to help track down the
problem and which seem like they could be useful in the future.
2013-03-26 15:16:58 -04:00
Niko Matsakis e11d13f3de Rip out old code that still structured method calls as a
expr_call(expr_field(...)) rather than an expr_method_call.
There is probably more such code in trans that should be removed.
2013-03-26 15:16:58 -04:00
bors bbc4ca1349 auto merge of #5532 : brson/rust/coredocs, r=brson
r?
2013-03-26 12:16:19 -07:00
Brian Anderson e5f8026eba core: Make sure every module at least has a one-line description 2013-03-26 11:48:22 -07:00
Brian Anderson 113fbfc795 core: Clarify prelude docs. #4556 2013-03-26 11:47:52 -07:00
bors d96bbb907e auto merge of #5556 : nikomatsakis/rust/issues-4904-and-4855, r=nikomatsakis
Two small fixes. 

r? @catamorphism
2013-03-26 11:16:22 -07:00