From 8ba025ea405089381c16eed4172cf157424bb497 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 18 Jan 2024 21:14:16 +0100 Subject: [PATCH] Test async fn --- tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs b/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs index 6f4b81b9b25b0..5324c795c62fb 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs @@ -1,3 +1,4 @@ +// edition: 2018 // check-pass #![feature(never_patterns)] #![allow(incomplete_features)] @@ -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 +}