about summary refs log tree commit diff
path: root/src/libserialize
AgeCommit message (Collapse)AuthorLines
2014-10-09Use the same html_root_url for all docsBrian Anderson-1/+1
2014-10-09Revert "Update html_root_url for 0.12.0 release"Brian Anderson-1/+1
This reverts commit 2288f332301b9e22db2890df256322650a7f3445.
2014-10-09serialize: Convert statics to constantsAlex Crichton-8/+6
2014-10-07Update html_root_url for 0.12.0 releaseBrian Anderson-1/+1
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-5/+5
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-0/+2
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-14/+1
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-5/+5
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-2/+1
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02syntax: mark the managed_boxes feature as Removed.Eduard Burtescu-1/+1
2014-10-02serialize: remove proxy impls for Gc<T>.Eduard Burtescu-13/+0
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-5/+5
2014-09-30librustc: Forbid `..` in range patterns.Patrick Walton-17/+19
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes #17295. [breaking-change]
2014-09-28Use the same JSON schema for encoding enums in PrettyEncoder as in EncoderBrian Koropoff-8/+16
Closes issue #17607
2014-09-27auto merge of #17506 : sfackler/rust/cfg-attr, r=alexcrichtonbors-3/+3
cc #17490 Reopening of #16230
2014-09-26auto merge of #17504 : danburkert/rust/tuple-serialization, r=alexcrichtonbors-1/+1
The tuple serialization logic should be using the tuple-specific emit function. This fixes part of #17158. The JSON encoder already proxies to `emit_seq_elt` when `emit_tuple_arg` is called, so this should have an effect.
2014-09-23Deprecate `#[ignore(cfg(...))]`Steven Fackler-3/+3
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-09-23use emit_tuple_arg while serializing tuplesDan Burkert-1/+1
2014-09-23Deal with the fallout of string stabilizationAlex Crichton-11/+11
2014-09-19Add enum variants to the type namespaceNick Cameron-52/+53
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-17rollup merge of #17276 : treeman/json-commaAlex Crichton-2/+10
2014-09-16Fallout from renamingAaron Turon-5/+5
2014-09-15json: Properly handle trailing comma error in object decoding.Jonas Hietala-2/+10
Closes #16945
2014-09-09Decoding json now defaults Option<_> to None.Jonas Hietala-1/+37
Closes #12794
2014-09-03Fix spelling errors and capitalization.Joseph Crail-1/+1
2014-08-30auto merge of #16859 : alexcrichton/rust/snapshots, r=huonwbors-1/+0
2014-08-29Register new snapshotsAlex Crichton-1/+0
2014-08-30Unify non-snake-case lints and non-uppercase statics lintsP1start-3/+3
This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. [breaking-change]
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-2/+3
2014-08-26Rebasing changesNick Cameron-1/+0
2014-08-26Use temp vars for implicit coercion to ^[T]Nick Cameron-2/+3
2014-08-26Use the slice repr for ~[T]Nick Cameron-0/+1
2014-08-21Parameterize indent in PrettyEncoderAustin Bonander-18/+85
2014-08-20auto merge of #16621 : tshepang/rust/grammar, r=steveklabnikbors-1/+1
2014-08-20doc: grammar fixesTshepang Lekhonkhobe-1/+1
2014-08-19Don't fail if an object is keyed with a string and we're expecting a numberErick Tryzelaar-2/+24
2014-08-19serialize: add json bounds checks, support for u64s, and testsErick Tryzelaar-142/+266
2014-08-19serialize: add json::{Integer,Floating} to parse large integers properlyErick Tryzelaar-107/+200
[breaking-change]
2014-08-11Reenable ignored test and add run-pass test.Luqman Aden-1/+0
2014-08-10remove outdated commentChuck Ries-2/+0
These are already coded as traits.
2014-08-06Remove cast to char in libserialize::hexnham-5/+5
2014-08-06Use byte literals in libserializenham-10/+10
2014-07-31libserialize: add `error()` to `Decoder`Andrew Poelstra-0/+8
A quick and dirty fix for #15036 until we get serious decoder reform. Right now it is impossible for a Decodable to signal a decode error, for example if it has only finitely many allowed values, is a string which must be encoded a certain way, needs a valid checksum, etc. For example in the libuuid implementation of Decodable an Option is unwrapped, meaning that a decode of a malformed UUID will cause the task to fail. Since this adds a method to the `Decoder` trait, all users will need to update their implementations to add it. The strategy used for the current implementations for JSON and EBML is to add a new entry to the error enum `ApplicationError(String)` which stores the string provided to `.error()`. [breaking-change]
2014-07-31remove serialize::ebml, add librbmlErick Tryzelaar-1296/+0
Our implementation of ebml has diverged from the standard in order to better serve the needs of the compiler, so it doesn't make much sense to call what we have ebml anyore. Furthermore, our implementation is pretty crufty, and should eventually be rewritten into a format that better suits the needs of the compiler. This patch factors out serialize::ebml into librbml, otherwise known as the Really Bad Markup Language. This is a stopgap library that shouldn't be used by end users, and will eventually be replaced by something better. [breaking-change]
2014-07-29remove seek from std::io::MemWriter, add SeekableMemWriter to librustcErick Tryzelaar-2/+118
Not all users of MemWriter need to seek, but having MemWriter seekable adds between 3-29% in overhead in certain circumstances. This fixes that performance gap by making a non-seekable MemWriter, and creating a new SeekableMemWriter for those circumstances when that functionality is actually needed. ``` test io::mem::test::bench_buf_reader ... bench: 682 ns/iter (+/- 85) test io::mem::test::bench_buf_writer ... bench: 580 ns/iter (+/- 57) test io::mem::test::bench_mem_reader ... bench: 793 ns/iter (+/- 99) test io::mem::test::bench_mem_writer_001_0000 ... bench: 48 ns/iter (+/- 27) test io::mem::test::bench_mem_writer_001_0010 ... bench: 65 ns/iter (+/- 27) = 153 MB/s test io::mem::test::bench_mem_writer_001_0100 ... bench: 132 ns/iter (+/- 12) = 757 MB/s test io::mem::test::bench_mem_writer_001_1000 ... bench: 802 ns/iter (+/- 151) = 1246 MB/s test io::mem::test::bench_mem_writer_100_0000 ... bench: 481 ns/iter (+/- 28) test io::mem::test::bench_mem_writer_100_0010 ... bench: 1957 ns/iter (+/- 126) = 510 MB/s test io::mem::test::bench_mem_writer_100_0100 ... bench: 8222 ns/iter (+/- 434) = 1216 MB/s test io::mem::test::bench_mem_writer_100_1000 ... bench: 82496 ns/iter (+/- 11191) = 1212 MB/s test io::mem::test::bench_seekable_mem_writer_001_0000 ... bench: 48 ns/iter (+/- 2) test io::mem::test::bench_seekable_mem_writer_001_0010 ... bench: 64 ns/iter (+/- 2) = 156 MB/s test io::mem::test::bench_seekable_mem_writer_001_0100 ... bench: 129 ns/iter (+/- 7) = 775 MB/s test io::mem::test::bench_seekable_mem_writer_001_1000 ... bench: 801 ns/iter (+/- 159) = 1248 MB/s test io::mem::test::bench_seekable_mem_writer_100_0000 ... bench: 711 ns/iter (+/- 51) test io::mem::test::bench_seekable_mem_writer_100_0010 ... bench: 2532 ns/iter (+/- 227) = 394 MB/s test io::mem::test::bench_seekable_mem_writer_100_0100 ... bench: 8962 ns/iter (+/- 947) = 1115 MB/s test io::mem::test::bench_seekable_mem_writer_100_1000 ... bench: 85086 ns/iter (+/- 11555) = 1175 MB/s ``` [breaking-change]
2014-07-29serialize: fix a warningErick Tryzelaar-1/+1
2014-07-24Deprecated `str::raw::from_utf8_owned`Adolfo OchagavĂ­a-4/+4
Replaced by `string::raw::from_utf8` [breaking-change]
2014-07-23Convert some push_back users to pushBrian Anderson-3/+3