From 1d106a5da052d177ec34a14b76df355bb9dab45f Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 20 Mar 2024 22:51:29 +0100 Subject: [PATCH] Fixes in various places --- src/eval.rs | 1 + tests/pass/async-fn.rs | 1 + tests/pass/enums.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/eval.rs b/src/eval.rs index 1173da4697..d781188cd0 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -463,6 +463,7 @@ pub fn eval_entry<'tcx>( let res = match res { Err(res) => res, // `Ok` can never happen + #[cfg(bootstrap)] Ok(never) => match never {}, }; diff --git a/tests/pass/async-fn.rs b/tests/pass/async-fn.rs index 13400c88c7..67ec2e26b3 100644 --- a/tests/pass/async-fn.rs +++ b/tests/pass/async-fn.rs @@ -59,6 +59,7 @@ async fn hello_world() { } // This example comes from https://github.com/rust-lang/rust/issues/115145 +#[allow(unreachable_patterns)] async fn uninhabited_variant() { async fn unreachable(_: Never) {} diff --git a/tests/pass/enums.rs b/tests/pass/enums.rs index ac7aafc1bb..1dafef025e 100644 --- a/tests/pass/enums.rs +++ b/tests/pass/enums.rs @@ -43,6 +43,7 @@ fn discriminant_overflow() { } } +#[allow(unreachable_patterns)] fn more_discriminant_overflow() { pub enum Infallible {}