diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2019-12-23 13:59:11 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2019-12-23 14:07:01 +0100 |
commit | 1ff5433aef7b4bdb04c67f37d349fbc9e2c1f4e4 (patch) | |
tree | bd79724d13740e26d14dfc9e8c2c61b5bbf30e42 | |
parent | 7e8a3053948762e32f39a1f5caf08ad9706d7477 (diff) | |
download | servo-1ff5433aef7b4bdb04c67f37d349fbc9e2c1f4e4.tar.gz servo-1ff5433aef7b4bdb04c67f37d349fbc9e2c1f4e4.zip |
Upgrade to rustc 1.42.0-nightly (9b98af84c 2019-12-22)
-rw-r--r-- | components/config/Cargo.toml | 2 | ||||
-rw-r--r-- | components/net/http_cache.rs | 11 | ||||
-rw-r--r-- | components/script_plugins/lib.rs | 4 | ||||
-rw-r--r-- | rust-toolchain | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index 774c1b0f7bf..f930b60a5d3 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -30,5 +30,5 @@ servo_config_plugins = { path = "../config_plugins" } [dev-dependencies] std_test_override = { path = "../std_test_override" } -[target.'cfg(not(any(target_os = "android", feature = "uwp")))'.dependencies] +[target.'cfg(not(target_os = "android"))'.dependencies] dirs = "1.0" diff --git a/components/net/http_cache.rs b/components/net/http_cache.rs index e47b4e81951..592ad7a99aa 100644 --- a/components/net/http_cache.rs +++ b/components/net/http_cache.rs @@ -230,12 +230,15 @@ fn get_response_expiry(response: &Response) -> Duration { let max_heuristic = Duration::hours(24) - age; let heuristic_freshness = if let Some(last_modified) = // If the response has a Last-Modified header field, - // caches are encouraged to use a heuristic expiration value - // that is no more than some fraction of the interval since that time. - response.headers.typed_get::<LastModified>() { + // caches are encouraged to use a heuristic expiration value + // that is no more than some fraction of the interval since that time. + response.headers.typed_get::<LastModified>() + { let current = time::now().to_timespec(); let last_modified: SystemTime = last_modified.into(); - let last_modified = last_modified.duration_since(SystemTime::UNIX_EPOCH).unwrap(); + let last_modified = last_modified + .duration_since(SystemTime::UNIX_EPOCH) + .unwrap(); let last_modified = Timespec::new(last_modified.as_secs() as i64, 0); // A typical setting of this fraction might be 10%. let raw_heuristic_calc = (current - last_modified) / 10; diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index ea2b0fa74a6..f686f64f6fe 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -216,8 +216,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { let parent_item = map.expect_item(map.get_parent_item(var.id)); if !has_lint_attr(&self.symbols, &parent_item.attrs, self.symbols.must_root) { match var.data { - hir::VariantData::Tuple(ref fields, ..) => { - for ref field in fields { + hir::VariantData::Tuple(fields, ..) => { + for field in fields { let def_id = cx.tcx.hir().local_def_id(field.hir_id); if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) { cx.span_lint( diff --git a/rust-toolchain b/rust-toolchain index fc40182b3c4..85efddc5ce0 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2019-12-05 +nightly-2019-12-23 |