Skip to content

Commit

Permalink
Upgrade toolchain to nightly-2024-01-23
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval committed Jan 24, 2024
1 parent d8936d6 commit 59d5921
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion kani-compiler/src/kani_middle/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ fn parse_integer(attr: &Attribute) -> Option<u128> {
if attr_args.len() == 1 {
let x = attr_args[0].lit()?;
match x.kind {
LitKind::Int(y, ..) => Some(y),
LitKind::Int(y, ..) => Some(y.get()),
_ => None,
}
}
Expand Down
2 changes: 1 addition & 1 deletion kani-compiler/src/kani_middle/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,6 @@ fn custom_coerce_unsize_info<'tcx>(
}

/// Extract pointee type from builtin pointer types.
fn extract_pointee<'tcx>(tcx: TyCtxt<'tcx>, typ: TyStable) -> Option<Ty<'tcx>> {
fn extract_pointee(tcx: TyCtxt<'_>, typ: TyStable) -> Option<Ty<'_>> {
rustc_internal::internal(tcx, typ).builtin_deref(true).map(|TypeAndMut { ty, .. }| ty)
}
9 changes: 4 additions & 5 deletions kani-compiler/src/kani_middle/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,11 @@ fn resolve_in_type<'tcx>(
name: &str,
) -> Result<DefId, ResolveError<'tcx>> {
debug!(?name, ?type_id, "resolve_in_type");
let missing_item_err =
|| ResolveError::MissingItem { tcx, base: type_id, unresolved: name.to_string() };
// Try the inherent `impl` blocks (i.e., non-trait `impl`s).
tcx.inherent_impls(type_id)
.map_err(|_| missing_item_err())?
.iter()
.flat_map(|impl_id| tcx.associated_item_def_ids(impl_id))
.cloned()
Expand All @@ -409,9 +412,5 @@ fn resolve_in_type<'tcx>(
let last = item_path.split("::").last().unwrap();
last == name
})
.ok_or_else(|| ResolveError::MissingItem {
tcx,
base: type_id,
unresolved: name.to_string(),
})
.ok_or_else(missing_item_err)
}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT

[toolchain]
channel = "nightly-2024-01-08"
channel = "nightly-2024-01-23"
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

0 comments on commit 59d5921

Please sign in to comment.