summary refs log tree commit diff
path: root/src/libserialize
AgeCommit message (Collapse)AuthorLines
2019-06-26Fix clippy::cast_loslessIgor Matuszewski-7/+7
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-1/+1
2019-06-25Use f{32,64}::from_bitsIgor Matuszewski-2/+2
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-9/+9
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-16Separate libserialize modulechansuke-212/+210
2019-06-10Rollup merge of #59600 - tobia:master, r=pnkfelixMazdak Farrokhzad-5/+12
Replaced linear token counting macros with optimized implementation There are currently two distinct token-counting macros in the source. Both implement the trivial algorithm, with linear complexity. They may or may not be adequate for their use case, but considering that other people are probably going to copy and paste them whenever they need a token-counting macro, I replaced them with an optimized implementation with logarithmic complexity.
2019-06-01rustc: use indexmap instead of a plain vector for upvars.Eduard-Mihai Burtescu-0/+70
2019-05-07serialize: add missing Encodable impl for Path.Eduard-Mihai Burtescu-1/+7
2019-04-21Allow unused_extern_crates for rustc_libserializePhilipp Hansch-0/+2
2019-04-13Replaced linear token counting macros with optimized implementationTobia-5/+12
2019-04-10Remove useless ?Sized boundJohn Kåre Alsaker-2/+2
2019-04-05Impl UseSpecializedDecodable for &TJohn Kåre Alsaker-0/+1
2019-04-05Introduce an arena type which may be used to allocate a list of types with ↵John Kåre Alsaker-1/+1
destructors
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-37/+37
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12Rollup merge of #58318 - taiki-e:libserialize-2018, r=CentrilMazdak Farrokhzad-1609/+1607
libserialize => 2018 Transitions `libserialize` to Rust 2018; cc #58099 This includes a commit from #58252 (thanks @h-michael!) r? @Centril
2019-02-10rustc: doc commentsAlexander Regueiro-37/+37
2019-02-09Cleanup importsTaiki Endo-3/+2
2019-02-09Move some tests into the tests directoryTaiki Endo-1570/+1568
This moves tests in opaque.rs and tests other than tests that require private items in json.rs into tests/opaque.rs and tests/json.rs.
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-07Transition libserialize to 2018 editionHirokazu Hata-41/+42
2019-01-13Cosmetic improvementsAlexander Regueiro-1/+1
2018-12-25Remove licensesMark Rousskov-70/+0
2018-12-21Inline tweaksJohn Kåre Alsaker-0/+1
2018-12-12Bump to 1.33.0Alex Crichton-1/+1
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-10Upgrade `smallvec` to 0.6.7 and use the new `may_dangle` feature.Nicholas Nethercote-1/+1
2018-11-21serialize: preallocate VecDeque in Decodable::decodeljedrz-1/+1
2018-11-13A few tweaks to iterations/collectingljedrz-1/+1
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-20Improve handling of type bounds in `bit_set.rs`.Nicholas Nethercote-0/+14
Currently, `BitSet` doesn't actually know its own domain size; it just knows how many words it contains. To improve things, this commit makes the following changes. - It changes `BitSet` and `SparseBitSet` to store their own domain size, and do more precise bounds and same-size checks with it. It also changes the signature of `BitSet::to_string()` (and puts it within `impl ToString`) now that the domain size need not be passed in from outside. - It uses `derive(RustcDecodable, RustcEncodable)` for `BitSet`. This required adding code to handle `PhantomData` in `libserialize`. - As a result, it removes the domain size from `HybridBitSet`, making a lot of that code nicer. - Both set_up_to() and clear_above() were overly general, working with arbitrary sizes when they are only needed for the domain size. The commit removes the former, degeneralizes the latter, and removes the (overly general) tests. - Changes `GrowableBitSet::grow()` to `ensure()`, fixing a bug where a (1-based) domain size was confused with a (0-based) element index. - Changes `BitMatrix` to store its row count, and do more precise bounds checks with it. - Changes `ty_params` in `select.rs` from a `BitSet` to a `GrowableBitSet` because it repeatedly failed the new, more precise bounds checks. (Changing the type was simpler than computing an accurate domain size.) - Various other minor improvements.
2018-09-14Rollup merge of #54095 - kenta7777:kenta7777#53719, r=davidtwcokennytm-8/+8
Rename all mentions of `nil` to `unit` Fixes #53719. Renamed keywords nil to unit.
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-11renamed emit_nil to emit_unitkenta7777-8/+8
2018-09-11Revert "renamed emit_nil to emit_unit"kenta7777-8/+8
This reverts commit d02a5ffaed9c395ae62ee12d0f4e04946c62edb1.
2018-09-11Revert "renamed read_nil to read_unit"kenta7777-4/+4
This reverts commit 37d0600c23ba1890346078bd7f310e15915417b2.
2018-09-10renamed read_nil to read_unitkenta7777-4/+4
2018-09-10renamed emit_nil to emit_unitkenta7777-8/+8
2018-09-07rewrite constants to use NewType::MAX instead of u32::MAXNiko Matsakis-0/+13
Also, adjust the MAX to be `u32::MAX - 1`, leaving room for `u32::MAX` to become a sentinel value in the future.
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-23Use optimized SmallVec implementationIgor Gutorov-0/+37
2018-08-21Rollup merge of #53393 - BurntPizza:serialize-inlines, r=alexcrichtonkennytm-20/+23
Mark libserialize functions as inline Got to thinking: "what if that big pile of tiny functions isn't inlining as it should?" So a few `replace-regex` later the local perf run says this: <details> ![](https://i.imgur.com/gvdJEgG.png) </details> Not huge, but still a win, which is interesting. Want to verify with the real perf run, but I understand there's a backlog. I didn't notice any increase in compile time or binary sizes for rustc/libs.
2018-08-17Remove inline attribute on generic functionsBurntPizza-138/+18
2018-08-17Rollup merge of #53313 - llogiq:two-small-improvements, r=estebankkennytm-4/+3
Two small improvements In `librustc_apfloat/ieee.rs`, use the iterator.[r]find methods to simplify the code. In `libserialize/json.rs`, make use of the fact that `Vec.last` on an empty `Vec` returns `None` to simplify the code to a single match.
2018-08-17Rollup merge of #52946 - Ajacmac:doc-impl-from, r=GuillaumeGomezkennytm-0/+3
Documented impl From on line 367 of libserialize/json.rs This is for the impl From mentioned in #51430 assigned to @skade . Hopefully I didn't miss anything/get anything wrong. I looked over another PR for another part of this same issue to see what the proper formatting was, etc. Thanks!
2018-08-15Mark libserialize functions as inlineBurntPizza-0/+123
2018-08-15Two small improvementsAndre Bogus-4/+3
In `librustc_apfloat/ieee.rs`, use the iterator.[r]find methods to simplify the code. In `libserialize/json.rs`, make use of the fact that `Vec.last` on an empty `Vec` returns `None` to simplify the code to a single match.
2018-08-14Corrected typing description in docJacob-1/+1
2018-08-14Rollup merge of #53246 - ljedrz:cleanup_various, r=kennytmkennytm-33/+31
A few cleanups - change `skip(1).next()` to `nth(1)` - collapse some `if-else` expressions - remove a few explicit `return`s - remove an unnecessary field name - dereference once instead of matching on multiple references - prefer `iter().enumerate()` to indexing with `for` - remove some unnecessary lifetime annotations - use `writeln!()` instead of `write!()`+`\n` - remove redundant parentheses - shorten some enum variant names - a few other cleanups suggested by `clippy`
2018-08-11A few cleanups for fmt_macros, graphviz, apfloat, target, serialize and termljedrz-33/+31
2018-08-09[nll] libserialize: enable feature(nll) for bootstrapmemoryruins-0/+1