Skip to content

Commit

Permalink
Test async fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Jan 18, 2024
1 parent 0a1bc0d commit 8ba025e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// edition: 2018
// check-pass
#![feature(never_patterns)]
#![allow(incomplete_features)]
Expand Down Expand Up @@ -27,3 +28,8 @@ fn never_match() -> u32 {
}
println!(); // Ensures this typechecks because of divergence.
}

// Divergence is not detected but at least nothing weirder happens.
async fn async_never(!: Void) -> u32 {
0
}

0 comments on commit 8ba025e

Please sign in to comment.