Skip to content

Commit 57cebd4

Browse files
authored
Rollup merge of #149824 - ShoyuVanilla:issue-145748, r=Kivooeo
Add a regression test for issue 145748 Seems to be fixed while allowing non-defining usages of opaques in next-solver. Closes #145748
2 parents 4da61b6 + d440210 commit 57cebd4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/ui/traits/next-solver/normalize/normalize-const-in-async-body.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//@ check-pass
33
//@ edition:2021
44

5+
// Regression test for https://github.com/rust-lang/rust/issues/129865.
6+
57
pub async fn cleanse_old_array_async(_: &[u8; BUCKET_LEN]) {}
68

79
pub const BUCKET_LEN: usize = 0;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//@ ignore-compare-mode-next-solver
2+
//@ compile-flags: -Znext-solver
3+
//@ check-pass
4+
5+
// Make sure that we support non-defining uses in borrowck.
6+
// Regression test for https://github.com/rust-lang/rust/issues/145748.
7+
8+
pub fn f(_: &()) -> impl Fn() + '_ {
9+
|| {
10+
let _ = f(&());
11+
}
12+
}
13+
14+
fn main() {}

0 commit comments

Comments
 (0)