Skip to content

Commit 379413f

Browse files
committed
Upgrade toolchain to nightly-2023-01-16
This commit fixes compilation errors but not runtime ones. Related changes: rust-lang/rust#104986 rust-lang/rust#105657 rust-lang/rust#105603 rust-lang/rust#105613
1 parent 55fe61c commit 379413f

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ impl<'tcx> GotocCtx<'tcx> {
365365
"add_with_overflow" => codegen_op_with_overflow!(add_overflow_result),
366366
"arith_offset" => self.codegen_offset(intrinsic, instance, fargs, p, loc),
367367
"assert_inhabited" => self.codegen_assert_intrinsic(instance, intrinsic, span),
368-
"assert_uninit_valid" => self.codegen_assert_intrinsic(instance, intrinsic, span),
368+
"assert_mem_uninitialized_valid" => {
369+
self.codegen_assert_intrinsic(instance, intrinsic, span)
370+
}
369371
"assert_zero_valid" => self.codegen_assert_intrinsic(instance, intrinsic, span),
370372
// https://doc.rust-lang.org/core/intrinsics/fn.assume.html
371373
// Informs the optimizer that a condition is always true.

kani-compiler/src/codegen_cprover_gotoc/codegen/place.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ impl<'tcx> GotocCtx<'tcx> {
243243
match t {
244244
TypeOrVariant::Type(t) => {
245245
match t.kind() {
246-
ty::Bool
246+
ty::Alias(..)
247+
| ty::Bool
247248
| ty::Char
248249
| ty::Int(_)
249250
| ty::Uint(_)
@@ -254,10 +255,8 @@ impl<'tcx> GotocCtx<'tcx> {
254255
| ty::GeneratorWitness(..)
255256
| ty::Foreign(..)
256257
| ty::Dynamic(..)
257-
| ty::Projection(_)
258258
| ty::Bound(..)
259259
| ty::Placeholder(..)
260-
| ty::Opaque(..)
261260
| ty::Param(_)
262261
| ty::Infer(_)
263262
| ty::Error(_) => unreachable!("type {:?} does not have a field", t),

kani-compiler/src/codegen_cprover_gotoc/codegen/typ.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ impl<'tcx> GotocCtx<'tcx> {
813813
)
814814
}
815815
}
816-
ty::Projection(_) | ty::Opaque(_, _) => {
816+
ty::Alias(..) => {
817817
unreachable!("Type should've been normalized already")
818818
}
819819

@@ -1226,7 +1226,7 @@ impl<'tcx> GotocCtx<'tcx> {
12261226
ty::Dynamic(..) | ty::Slice(_) | ty::Str => {
12271227
unreachable!("Should have generated a fat pointer")
12281228
}
1229-
ty::Projection(_) | ty::Opaque(..) => {
1229+
ty::Alias(..) => {
12301230
unreachable!("Should have been removed by normalization")
12311231
}
12321232

kani-compiler/src/kani_middle/coercion.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_hir::lang_items::LangItem;
1717
use rustc_middle::traits::{ImplSource, ImplSourceUserDefinedData};
1818
use rustc_middle::ty::adjustment::CustomCoerceUnsized;
1919
use rustc_middle::ty::TypeAndMut;
20-
use rustc_middle::ty::{self, ParamEnv, TraitRef, Ty, TyCtxt};
20+
use rustc_middle::ty::{self, ParamEnv, Ty, TyCtxt};
2121
use rustc_span::symbol::Symbol;
2222
use tracing::trace;
2323

@@ -213,10 +213,9 @@ fn custom_coerce_unsize_info<'tcx>(
213213
) -> CustomCoerceUnsized {
214214
let def_id = tcx.require_lang_item(LangItem::CoerceUnsized, None);
215215

216-
let trait_ref = ty::Binder::dummy(TraitRef {
217-
def_id,
218-
substs: tcx.mk_substs_trait(source_ty, [target_ty.into()]),
219-
});
216+
let trait_ref = ty::Binder::dummy(
217+
tcx.mk_trait_ref(def_id, tcx.mk_substs_trait(source_ty, [target_ty.into()])),
218+
);
220219

221220
match tcx.codegen_select_candidate((ParamEnv::reveal_all(), trait_ref)) {
222221
Ok(ImplSource::UserDefined(ImplSourceUserDefinedData { impl_def_id, .. })) => {

kani-compiler/src/kani_middle/stubbing/annotations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl Callbacks for CollectorCallbacks {
4040
_compiler: &Compiler,
4141
queries: &'tcx Queries<'tcx>,
4242
) -> Compilation {
43-
queries.global_ctxt().unwrap().peek_mut().enter(|tcx| {
43+
queries.global_ctxt().unwrap().enter(|tcx| {
4444
for item in tcx.hir_crate_items(()).items() {
4545
let local_def_id = item.owner_id.def_id;
4646
let def_id = local_def_id.to_def_id();

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2022-12-11"
5+
channel = "nightly-2023-01-16"
66
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

0 commit comments

Comments
 (0)