mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Upgrade to rustc 1.42.0-nightly (9b98af84c 2019-12-22)
This commit is contained in:
parent
7e8a305394
commit
1ff5433aef
4 changed files with 11 additions and 8 deletions
|
@ -30,5 +30,5 @@ servo_config_plugins = { path = "../config_plugins" }
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
std_test_override = { path = "../std_test_override" }
|
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"
|
dirs = "1.0"
|
||||||
|
|
|
@ -230,12 +230,15 @@ fn get_response_expiry(response: &Response) -> Duration {
|
||||||
let max_heuristic = Duration::hours(24) - age;
|
let max_heuristic = Duration::hours(24) - age;
|
||||||
let heuristic_freshness = if let Some(last_modified) =
|
let heuristic_freshness = if let Some(last_modified) =
|
||||||
// If the response has a Last-Modified header field,
|
// If the response has a Last-Modified header field,
|
||||||
// caches are encouraged to use a heuristic expiration value
|
// caches are encouraged to use a heuristic expiration value
|
||||||
// that is no more than some fraction of the interval since that time.
|
// that is no more than some fraction of the interval since that time.
|
||||||
response.headers.typed_get::<LastModified>() {
|
response.headers.typed_get::<LastModified>()
|
||||||
|
{
|
||||||
let current = time::now().to_timespec();
|
let current = time::now().to_timespec();
|
||||||
let last_modified: SystemTime = last_modified.into();
|
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);
|
let last_modified = Timespec::new(last_modified.as_secs() as i64, 0);
|
||||||
// A typical setting of this fraction might be 10%.
|
// A typical setting of this fraction might be 10%.
|
||||||
let raw_heuristic_calc = (current - last_modified) / 10;
|
let raw_heuristic_calc = (current - last_modified) / 10;
|
||||||
|
|
|
@ -216,8 +216,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
let parent_item = map.expect_item(map.get_parent_item(var.id));
|
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) {
|
if !has_lint_attr(&self.symbols, &parent_item.attrs, self.symbols.must_root) {
|
||||||
match var.data {
|
match var.data {
|
||||||
hir::VariantData::Tuple(ref fields, ..) => {
|
hir::VariantData::Tuple(fields, ..) => {
|
||||||
for ref field in fields {
|
for field in fields {
|
||||||
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
|
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) {
|
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
|
||||||
cx.span_lint(
|
cx.span_lint(
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2019-12-05
|
nightly-2019-12-23
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue