Skip to content

Commit

Permalink
Fixes in various places
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Aug 10, 2024
1 parent 22f2c27 commit 1d106a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {},
};

Expand Down
1 change: 1 addition & 0 deletions tests/pass/async-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand Down
1 change: 1 addition & 0 deletions tests/pass/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ fn discriminant_overflow() {
}
}

#[allow(unreachable_patterns)]
fn more_discriminant_overflow() {
pub enum Infallible {}

Expand Down

0 comments on commit 1d106a5

Please sign in to comment.