Upgrade to rustc 1.36.0-nightly (e305df184 2019-04-24)

This includes a `size_of` regression for a few DOM types,
due to https://github.com/rust-lang/rust/pull/58623 which replaces the
implementation of `HashMap` in the standard library to Hashbrown.

Although `size_of<HashMap>` grows, it’s not obvious how total memory usage
is going to be impacted: Hashbrown only has one `u8` instead of one `usize`
of overhead per hash table bucket for storing (part of) a hash,
and so might allocate less memory itself.

Hashbrown also typically has better run time performance:
https://github.com/rust-lang/hashbrown#performance

Still, I’ve filed https://github.com/rust-lang/hashbrown/issues/69
about potentially reducing the `size_of<HashMap>` regression.
This commit is contained in:
Simon Sapin 2019-04-25 13:52:04 +02:00
parent 07d1559141
commit 51d6b6350e
4 changed files with 22 additions and 22 deletions

24
Cargo.lock generated
View file

@ -439,7 +439,7 @@ dependencies = [
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"compositing 0.0.1",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.7 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
@ -459,7 +459,7 @@ dependencies = [
name = "canvas_traits"
version = "0.0.1"
dependencies = [
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.7 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -848,7 +848,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cssparser"
version = "0.25.1"
version = "0.25.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cssparser-macros 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2573,7 +2573,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-channel 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.7 (registry+https://github.com/rust-lang/crates.io-index)",
"hashglobe 0.1.0",
"hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3560,7 +3560,7 @@ dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-channel 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"deny_public_fields 0.0.1",
"devtools_traits 0.0.1",
"dom_struct 0.0.1",
@ -3645,7 +3645,7 @@ dependencies = [
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"crossbeam-channel 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.7 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"html5ever 0.22.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3731,7 +3731,7 @@ name = "selectors"
version = "0.21.0"
dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4327,7 +4327,7 @@ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-channel 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.7 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4395,7 +4395,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.7 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.22.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4418,7 +4418,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.7 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4580,7 +4580,7 @@ dependencies = [
name = "to_shmem"
version = "0.0.1"
dependencies = [
"cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_arc 0.1.1",
"smallbitvec 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -5435,7 +5435,7 @@ dependencies = [
"checksum crossbeam-epoch 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c90f1474584f38e270b5b613e898c8c328aa4f3dea85e0a27ac2e642f009416"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015"
"checksum cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4c7e7b72ef04e94e80cec7a4bd795fc2a67a9ce627bc684cf95dd89711d972"
"checksum cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e06795910fc2f585a75bdc9690fbcc51e83519f07b6eb981db43944643c04933"
"checksum cssparser-macros 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b16e382d9b983fdb9ac6a36b37fdeb84ce3ea81f749febfee3463cfa7f24275e"
"checksum cstr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "19f7a08ed4ecd7e077d4cee63937473e6f7cf57b702a9114ef41751b2cbc0f60"
"checksum cstr-macros 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0f12dd847ec773fc98d75edba5394cb87d0f35e7ee548a4c81849ca6374b3d48"

View file

@ -25,7 +25,7 @@ pub fn derive(mut input: DeriveInput) -> TokenStream {
let s = Structure::new(&input);
let mut append_error_clause = s.variants().len() > 1;
let mut match_body = s.variants().iter().fold(quote!(), |body, variant| {
let match_body = s.variants().iter().fold(quote!(), |body, variant| {
let arm = match derive_variant_arm(variant, &mut where_clause) {
Ok(arm) => arm,
Err(()) => {

View file

@ -1 +1 @@
nightly-2019-04-18
nightly-2019-04-25

View file

@ -29,11 +29,11 @@ macro_rules! sizeof_checker (
);
// Update the sizes here
sizeof_checker!(size_event_target, EventTarget, 40);
sizeof_checker!(size_node, Node, 184);
sizeof_checker!(size_element, Element, 432);
sizeof_checker!(size_htmlelement, HTMLElement, 448);
sizeof_checker!(size_div, HTMLDivElement, 448);
sizeof_checker!(size_span, HTMLSpanElement, 448);
sizeof_checker!(size_text, Text, 216);
sizeof_checker!(size_characterdata, CharacterData, 216);
sizeof_checker!(size_event_target, EventTarget, 56);
sizeof_checker!(size_node, Node, 200);
sizeof_checker!(size_element, Element, 448);
sizeof_checker!(size_htmlelement, HTMLElement, 464);
sizeof_checker!(size_div, HTMLDivElement, 464);
sizeof_checker!(size_span, HTMLSpanElement, 464);
sizeof_checker!(size_text, Text, 232);
sizeof_checker!(size_characterdata, CharacterData, 232);