about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2013-03-26Switched over a bunch of splitting funktions to non-allocating iteratorsMarvin Löbel-23/+31
2013-03-26pre-rebase commitMarvin Löbel-2/+17
2013-03-25auto merge of #5528 : thestinger/rust/find_mut, r=brsonbors-5/+62
This currently requires workarounds for the borrow checker not being flow-sensitive for `LinearMap` and `TrieMap`, but it can already be expressed for `TreeMap` and `SmallIntMap` without that.
2013-03-25auto merge of #5525 : dbaupp/rust/minor_fixups, r=graydonbors-1/+0
Kills some warnings, and implements str::each_char_reverse so that it actually iterates. The test case wasn't detecting a failure, since the loop body was never executed.
2013-03-25auto merge of #5513 : apasel422/rust/deriving, r=luqmanabors-39/+4
This removes some explicit implementations of `Eq` in favor of `#[deriving(Eq)]` and derives `Clone` for a few core types.
2013-03-25auto merge of #5509 : thestinger/rust/oldmap, r=brsonbors-335/+28
The reasoning for doing it this way is that it's much easier to transition method-by-method to the `Map` API than trying to do the migration all at once. I found an issue unrelated to my changes in one of the run-fail tests - if it uses `LinearMap`, it still fails but exits with 0. I xfailed it for now and opened [an issue](https://github.com/mozilla/rust/issues/5512), because it's not caused by these changes.
2013-03-25Merge remote-tracking branch 'brson/rt'Brian Anderson-16/+1935
Conflicts: src/libcore/rt/context.rs src/libcore/rt/sched.rs src/libcore/rt/thread.rs src/libcore/rt/uv.rs
2013-03-24expose find_mut in the Map traitDaniel Micay-18/+18
2013-03-24smallintmap: add find_mut methodDaniel Micay-2/+28
2013-03-24treemap: add a find_mut methodDaniel Micay-3/+34
2013-03-25Kill some warnings: unused imports and old #[deny(..)]s.Huon Wilson-1/+0
2013-03-23replace impls with `deriving` where applicableAndrew Paseltiner-39/+4
2013-03-23turn std::oldmap into a wrapper around LinearMapDaniel Micay-335/+28
2013-03-22librustc: Add explicit lifetime binders and new lifetime notation in ↵Patrick Walton-53/+55
core/std/syntax/rustc
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-202/+202
2013-03-22remove obsolete purity workaroundsDaniel Micay-117/+101
2013-03-22libstd: Remove all uses of `pure` from libstd. rs=depurePatrick Walton-353/+353
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-86/+87