From c6b0f7888b93b29836a4645dc583cb52c875d04a Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Fri, 28 Nov 2025 23:58:50 +0900 Subject: [PATCH] Add a regression test for issue 129865 --- .../normalize/normalize-const-in-async-body.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/traits/next-solver/normalize/normalize-const-in-async-body.rs diff --git a/tests/ui/traits/next-solver/normalize/normalize-const-in-async-body.rs b/tests/ui/traits/next-solver/normalize/normalize-const-in-async-body.rs new file mode 100644 index 0000000000000..2b9454db3fac7 --- /dev/null +++ b/tests/ui/traits/next-solver/normalize/normalize-const-in-async-body.rs @@ -0,0 +1,14 @@ +//@ compile-flags: -Znext-solver +//@ check-pass +//@ edition:2021 + +pub async fn cleanse_old_array_async(_: &[u8; BUCKET_LEN]) {} + +pub const BUCKET_LEN: usize = 0; + +pub fn cleanse_old_array_async2() -> impl std::future::Future { + let x: [u8; 0 + 0] = []; + async move { let _ = x; } +} + +fn main() {}