From b4152b2dce7ac80f35796c84273f3de4b0de4135 Mon Sep 17 00:00:00 2001 From: tautschnig Date: Mon, 17 Apr 2023 02:43:38 +0000 Subject: [PATCH] Upgrade Rust toolchain to nightly-2023-02-18 Upstream PRs that require local changes: - Switch to EarlyBinder for type_of query https://github.com/rust-lang/rust/pull/107753 - Factor query arena allocation out from query caches https://github.com/rust-lang/rust/pull/107833 Co-authored-by: Qinheping Hu --- kani-compiler/src/codegen_cprover_gotoc/codegen/static_var.rs | 2 +- kani-compiler/src/kani_middle/provide.rs | 2 +- rust-toolchain.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kani-compiler/src/codegen_cprover_gotoc/codegen/static_var.rs b/kani-compiler/src/codegen_cprover_gotoc/codegen/static_var.rs index dfea9d31858d..42eb3982b08f 100644 --- a/kani-compiler/src/codegen_cprover_gotoc/codegen/static_var.rs +++ b/kani-compiler/src/codegen_cprover_gotoc/codegen/static_var.rs @@ -28,7 +28,7 @@ impl<'tcx> GotocCtx<'tcx> { let pretty_name = Instance::new(def_id, InternalSubsts::empty()).to_string(); debug!(?symbol_name, ?pretty_name, "declare_static {}", item); - let typ = self.codegen_ty(self.tcx.type_of(def_id)); + let typ = self.codegen_ty(self.tcx.type_of(def_id).subst_identity()); let span = self.tcx.def_span(def_id); let location = self.codegen_span(&span); let symbol = Symbol::static_variable(symbol_name.clone(), symbol_name, typ, location) diff --git a/kani-compiler/src/kani_middle/provide.rs b/kani-compiler/src/kani_middle/provide.rs index 990b56639890..03cf5bd5d9f6 100644 --- a/kani-compiler/src/kani_middle/provide.rs +++ b/kani-compiler/src/kani_middle/provide.rs @@ -6,10 +6,10 @@ use crate::kani_middle::reachability::{collect_reachable_items, filter_crate_items}; use crate::kani_middle::stubbing; +use crate::kani_middle::ty::query::query_provided::collect_and_partition_mono_items; use kani_queries::{QueryDb, UserInput}; use rustc_hir::def_id::DefId; use rustc_interface; -use rustc_middle::ty::query::query_stored::collect_and_partition_mono_items; use rustc_middle::{ mir::Body, ty::{query::ExternProviders, query::Providers, TyCtxt}, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 621fdb226fe7..5ce9d4ff0e42 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,5 +2,5 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT [toolchain] -channel = "nightly-2023-02-17" +channel = "nightly-2023-02-18" components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]