From 459e395519716b2aba90e88a9852c9821810dfb5 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 20 Mar 2024 22:51:29 +0100 Subject: [PATCH] Fixes in various places --- crates/hir-ty/src/mir/eval/shim.rs | 1 + crates/hir-ty/src/mir/lower.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/hir-ty/src/mir/eval/shim.rs b/crates/hir-ty/src/mir/eval/shim.rs index bd43a62341d1..d76f53818716 100644 --- a/crates/hir-ty/src/mir/eval/shim.rs +++ b/crates/hir-ty/src/mir/eval/shim.rs @@ -27,6 +27,7 @@ macro_rules! from_bytes { ($ty:tt, $value:expr) => { ($ty::from_le_bytes(match ($value).try_into() { Ok(it) => it, + #[allow(unreachable_patterns)] Err(_) => return Err(MirEvalError::InternalError("mismatched size".into())), })) }; diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs index 057f55338056..9aa2eeebc175 100644 --- a/crates/hir-ty/src/mir/lower.rs +++ b/crates/hir-ty/src/mir/lower.rs @@ -1161,6 +1161,7 @@ impl<'ctx> MirLowerCtx<'ctx> { ProjectionElem::OpaqueCast(it) => { ProjectionElem::OpaqueCast(it) } + #[allow(unreachable_patterns)] ProjectionElem::Index(it) => match it {}, }) .collect(),