summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-03-31Fix warningsBrian Anderson-2/+1
2013-03-30move dlist from core -> stdDaniel Micay-1/+988
Closes #3549
2013-03-30auto merge of #5630 : erickt/rust/serial, r=ericktbors-690/+772
@nikomatsakis and I were talking about how the serializers were a bit too complicated. None of the users of With the `emit_option` and `read_option` functions, the serializers are now moving more high level. This patch series continues that trend. I've removed support for emitting specific string and vec types, and added support for emitting mapping types.
2013-03-30std: add more json decoder tests.Erick Tryzelaar-12/+124
2013-03-30std: clean up the json pretty printer testsErick Tryzelaar-88/+71
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-2/+2
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-29std: Add Deque::eachi and a Deque serializer supportErick Tryzelaar-0/+58
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-1292/+1292
2013-03-29std: add serialization support for dlist, linearset, triemap, trieset, ↵Erick Tryzelaar-1/+183
treemap, and treeset
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-65/+0
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-1288/+1288
2013-03-29Register snapshotsBrian Anderson-49/+0
2013-03-29std: fix json deserializing vectors and a testErick Tryzelaar-6/+4
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-20/+26
2013-03-29std: add Encoder::emit_map and Decoder::read_mapErick Tryzelaar-103/+253
2013-03-29std: remove Encoder::read_rec and Decoder::emit_recErick Tryzelaar-41/+18
2013-03-29std: remove Encoder::emit_tup{,_elt} and Decoder::read_tup{,_elt}Erick Tryzelaar-50/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_vec and ↵Erick Tryzelaar-115/+76
Decoder::read_{owned,managed}_vec
2013-03-29std: remove Encoder::emit_{owned,managed} and Decoder::read_{owned,managed}Erick Tryzelaar-29/+5
2013-03-29std: remove Encoder::emit_{owned,managed}_str and ↵Erick Tryzelaar-66/+17
Decoder::read_{owned,managed}_str
2013-03-29std: remove prettyprintErick Tryzelaar-200/+0
Everyone uses fmt!("%?", ...) instead of the prettyprint module, so I'm removing this file.
2013-03-28Removing unused importsAlex Crichton-20/+26
2013-03-28std: change Decoder::read_option to return a generic typeErick Tryzelaar-11/+17
This allows read_option to be used with a custom option type instead of just core::Option.
2013-03-28std: change Decoder::read_option to return a generic typeErick Tryzelaar-11/+17
This allows read_option to be used with a custom option type instead of just core::Option.
2013-03-28auto merge of #5595 : catamorphism/rust/demoding, r=catamorphismbors-2/+1
2013-03-27auto merge of #5578 : erickt/rust/incoming, r=jbclements,ericktbors-207/+481
Hey folks, This patch series does some work on the json decoder, specifically with auto decoding of enums. Previously, we would take this code: ``` enum A { B, C(~str, uint) } ``` and would encode a value of this enum to either `["B", []]` or `["C", ["D", 123]]`. I've changed this to `"B"` or `["C", "D", 123]`. This matches the style of the O'Caml json library [json-wheel](http://mjambon.com/json-wheel.html). I've added tests to make sure all this work. In order to make this change, I added passing a `&[&str]` vec to `Decode::emit_enum_variant` so the json decoder can convert the name of a variant into it's position. I also changed the impl of `Encodable` for `Option<T>` to have the right upper casing. I also did some work on the parser, which allows for `fn foo<T: ::cmp::Eq>() { ... }` statements (#5572), fixed the pretty printer properly expanding `debug!("...")` expressions, and removed `ast::expr_vstore_fixed`, which doesn't appear to be used anymore.
2013-03-27auto merge of #5574 : thestinger/rust/docstring, r=sanxiynbors-0/+2
2013-03-27core/std: Remove uses of ++ modeTim Chevalier-1/+1
from stackwalk::frame_address and net_tcp::on_tcp_read_cb As per #4425
2013-03-27core: Remove unused importTim Chevalier-1/+0
2013-03-27Autoref the argument to the index operator (#4920)Niko Matsakis-9/+9
2013-03-27std: add some better failure msgs to jsonErick Tryzelaar-3/+3
2013-03-27std: add tests for decoding json enumsErick Tryzelaar-1/+14
2013-03-27std: Decode::read_enum_variant should pass in the variant namesErick Tryzelaar-2/+63
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-27std: add option type directly to serialize::{En,De}codeErick Tryzelaar-39/+68
2013-03-27std: change default json enum encoder to use strings or a flat vecErick Tryzelaar-41/+16
2013-03-27std: Add tests for json decoding optionsErick Tryzelaar-0/+18
2013-03-27std: fix json PrettyEncoder and add testsErick Tryzelaar-33/+220
2013-03-27std: change fail_unless to assert_eq in json.rsErick Tryzelaar-133/+128
2013-03-27std: serializing Options should use the right caseErick Tryzelaar-4/+4
2013-03-27std: clean json test importsErick Tryzelaar-6/+2
2013-03-27base64: add docstringDaniel Micay-0/+2
2013-03-26librustc: Remove obsolete syntaxPatrick Walton-1/+1
2013-03-26librustc: Enforce that `extern mod` directives come first, then `use` ↵Patrick Walton-2/+2
directives, then items. Resolve them in this order as well.
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-50/+57
2013-03-26librustc: Remove all uses of the old `[T * N]` fixed-length vector syntaxPatrick Walton-3/+3
2013-03-26libcore: Change `[const T]` to `const [T]` everywherePatrick Walton-16/+23
2013-03-26option: rm functions that duplicate methodsDaniel Micay-7/+6
2013-03-26std: Remove the oldmap moduleAlex Crichton-389/+0
2013-03-26Remove unused imports throughoutAlex Crichton-5/+0
2013-03-26Isolated bug, static vector seems to behave differently than fixed sized oneMarvin Löbel-1/+1