Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/eval/shim.rs')
-rw-r--r--crates/hir-ty/src/mir/eval/shim.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/hir-ty/src/mir/eval/shim.rs b/crates/hir-ty/src/mir/eval/shim.rs
index 512a275aa7..8d428dd6d0 100644
--- a/crates/hir-ty/src/mir/eval/shim.rs
+++ b/crates/hir-ty/src/mir/eval/shim.rs
@@ -761,7 +761,9 @@ impl Evaluator<'_> {
let size = self.size_of_sized(ty, locals, "size_of arg")?;
destination.write_from_bytes(self, &size.to_le_bytes()[0..destination.size])
}
- "min_align_of" | "pref_align_of" => {
+ // FIXME: `min_align_of` was renamed to `align_of` in Rust 1.89
+ // (https://github.com/rust-lang/rust/pull/142410)
+ "min_align_of" | "align_of" => {
let Some(ty) =
generic_args.as_slice(Interner).first().and_then(|it| it.ty(Interner))
else {
@@ -793,17 +795,19 @@ impl Evaluator<'_> {
destination.write_from_bytes(self, &size.to_le_bytes())
}
}
- "min_align_of_val" => {
+ // FIXME: `min_align_of_val` was renamed to `align_of_val` in Rust 1.89
+ // (https://github.com/rust-lang/rust/pull/142410)
+ "min_align_of_val" | "align_of_val" => {
let Some(ty) =
generic_args.as_slice(Interner).first().and_then(|it| it.ty(Interner))
else {
return Err(MirEvalError::InternalError(
- "min_align_of_val generic arg is not provided".into(),
+ "align_of_val generic arg is not provided".into(),
));
};
let [arg] = args else {
return Err(MirEvalError::InternalError(
- "min_align_of_val args are not provided".into(),
+ "align_of_val args are not provided".into(),
));
};
if let Some((_, align)) = self.size_align_of(ty, locals)? {