about summary refs log tree commit diff
path: root/src/libserialize
AgeCommit message (Collapse)AuthorLines
2014-07-22auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichtonbors-0/+4
2014-07-21ignore-lexer-test to broken files and remove some tray hyphensCorey Richardson-0/+4
I blame @ChrisMorgan for the hyphens.
2014-07-19Implement FromBase64 for &[u8].Simon Sapin-17/+29
The algorithm was already based on bytes internally. Also use byte literals instead of casting u8 to char for matching.
2014-07-18Ignore one test.Luqman Aden-0/+1
2014-07-17auto merge of #15675 : errordeveloper/rust/json_docs, r=steveklabnikbors-16/+71
- add one simple example of using `ToJson` trait - make example code more readable
2014-07-17deprecate Vec::getNick Cameron-1/+1
2014-07-16Improve docs on JSON.Ilya Dmitrichenko-16/+71
- add one simple example of using `ToJson` trait - make example code more readable
2014-07-15Deprecate `str::from_utf8_owned`Adolfo Ochagavía-13/+11
Use `String::from_utf8` instead [breaking-change]
2014-07-11Update doc URLs for version bumpBrian Anderson-1/+1
2014-07-09Register new snapshotsAlex Crichton-2/+0
Closes #15544
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-20/+20
[breaking-change]
2014-07-07auto merge of #15411 : mitchmindtree/rust/master, r=alexcrichtonbors-0/+30
I ran `make check` and everything went smoothly. I also tested `#[deriving(Decodable, Encodable)]` on a struct containing both Cell<T> and RefCell<T> and everything now seems to work fine.
2014-07-07Implemented Decodable/Encodable for Cell and RefCell. Fixes #15395mitchmindtree-0/+30
Updated PR with fixme and test Updated PR with fixme and test
2014-07-05Add #[crate_name] attributes as necessaryAlex Crichton-1/+3
2014-07-05auto merge of #15419 : erickt/rust/json, r=pcwaltonbors-37/+87
This speeds up json serialization by removing most of the allocations.
2014-07-04serialize: speed up json pretty printing by batch writing spacesErick Tryzelaar-4/+13
2014-07-04serialize: escaping json strings should write in batches.Erick Tryzelaar-15/+31
This significantly speeds up encoding json strings.
2014-07-04serialize: Remove allocations from escaping strs and indenting spacesErick Tryzelaar-38/+63
2014-07-04librustc: Remove the `&LIFETIME EXPR` production from the language.Patrick Walton-1/+1
This was parsed by the parser but completely ignored; not even stored in the AST! This breaks code that looks like: static X: &'static [u8] = &'static [1, 2, 3]; Change this code to the shorter: static X: &'static [u8] = &[1, 2, 3]; Closes #15312. [breaking-change]
2014-07-02Merge remote-tracking branch 'origin/master' into 0.11.0-releaseAlex Crichton-526/+314
Conflicts: src/libstd/lib.rs
2014-06-30Implement ToJson for all tuplesAdolfo Ochagavía-14/+26
2014-06-30Fix JSON documentationAdolfo Ochagavía-127/+40
Fixed some errors, removed some code examples and added usage of the `encode` and `decode` functions.
2014-06-30Implement FromStr for JsonAdolfo Ochagavía-3/+13
2014-06-30Add `encode` and `decode` shortcut functionsAdolfo Ochagavía-61/+49
Now you can just use `json::encode` and `json::decode`, which is very practical **Deprecated `Encoder::str_encode` in favor of `json::encode`** [breaking-change]
2014-06-30Removed unnecessary BoxAdolfo Ochagavía-7/+7
2014-06-30JSON cleanupAdolfo Ochagavía-263/+184
* Tried to make the code more idiomatic * Renamed the `wr` field of the `Encoder` and `PrettyEncoder` structs to `writer` * Replaced some `from_utf8` by `from_utf8_owned` to avoid unnecessary allocations * Removed unnecessary `unsafe` code
2014-06-29Implement RFC#28: Add PartialOrd::partial_cmpSteven Fackler-57/+1
I ended up altering the semantics of Json's PartialOrd implementation. It used to be the case that Null < Null, but I can't think of any reason for an ordering other than the default one so I just switched it over to using the derived implementation. This also fixes broken `PartialOrd` implementations for `Vec` and `TreeMap`. RFC: 0028-partial-cmp
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-3/+3
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-28auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwaltonbors-1/+1
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
2014-06-28Rename all raw pointers as necessaryAlex Crichton-1/+1
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-06-26json: Fix handling of NaN/Infinitymrec-6/+51
The JSON spec requires that these special values be serialized as null; the current serialization breaks any conformant JSON parser. So encoding needs to output "null", to_json on floating-point types can return Null as well as Number, and reading null when specifically expecting a number should be interpreted as NaN. There's no way to round-trip Infinity.
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-14/+14
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-21serialize: Simplify the json docsErick Tryzelaar-1/+1
2014-06-19auto merge of #15014 : brson/rust/all-crates-experimental, r=cmrbors-0/+1
This creates a stability baseline for all crates that we distribute that are not `std`. In general, all library code must start as experimental and progress in stages to become stable.
2014-06-18Deprecate the bytes!() macro.Simon Sapin-8/+8
Replace its usage with byte string literals, except in `bytes!()` tests. Also add a new snapshot, to be able to use the new b"foo" syntax. The src/etc/2014-06-rewrite-bytes-macros.py script automatically rewrites `bytes!()` invocations into byte string literals. Pass it filenames as arguments to generate a diff that you can inspect, or `--apply` followed by filenames to apply the changes in place. Diffs can be piped into `tip` or `pygmentize -l diff` for coloring.
2014-06-18Shorten endian conversion method namesBrendan Zabarauskas-1/+1
The consensus on #14917 was that the proposed names were too long.
2014-06-18Merge the Bitwise and ByteOrder traits into the Int traitBrendan Zabarauskas-3/+1
This reduces the complexity of the trait hierarchy.
2014-06-18Use ByteOrder methods instead of free-standing functionsBrendan Zabarauskas-2/+2
2014-06-17Mark all crates except std as experimentalBrian Anderson-0/+1
2014-06-18Remove TraitStore from ty_traitNick Cameron-7/+14
Use ty_rptr/ty_uniq(ty_trait) rather than TraitStore to represent trait types. Also addresses (but doesn't close) #12470. Part of the work towards DST (#12938). [breaking-change] lifetime parameters in `&mut trait` are now invariant. They used to be contravariant.
2014-06-16Update "use" to "uses" ln186theptrk-1/+1
2014-06-16auto merge of #14932 : Sawyer47/rust/json-smallfix, r=huonwbors-5/+1
2014-06-15Register new snapshotsAlex Crichton-68/+0
2014-06-15Small improvement for json PrettyEncoderPiotr Jawniak-5/+1
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-1/+1
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-14Register new snapshotsAlex Crichton-5/+0
2014-06-13auto merge of #14831 : alexcrichton/rust/format-intl, r=brsonbors-0/+68
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-0/+68
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-117/+89
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.