Upgrade to rustc 1.42.0-nightly (9b98af84c 2019-12-22)

This commit is contained in:
Simon Sapin 2019-12-23 13:59:11 +01:00
parent 7e8a305394
commit 1ff5433aef
4 changed files with 11 additions and 8 deletions

View file

@ -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"

View file

@ -232,10 +232,13 @@ fn get_response_expiry(response: &Response) -> Duration {
// 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>() {
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;

View file

@ -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(

View file

@ -1 +1 @@
nightly-2019-12-05
nightly-2019-12-23