Skip to content

Commit c781c9a

Browse files
authored
Rollup merge of rust-lang#140308 - lcnr:add-ui-test, r=compiler-errors
stall generator witness obligations: add regression test fixes rust-lang/trait-system-refactor-initiative#180 r? ```@compiler-errors```
2 parents 54eae59 + ee9bdca commit c781c9a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//@ revisions: current next
2+
//@ ignore-compare-mode-next-solver (explicit revisions)
3+
//@[next] compile-flags: -Znext-solver
4+
//@ check-pass
5+
//@ edition: 2024
6+
7+
// This test previously used the `is_copy_raw` query during
8+
// HIR typeck, dropping the list of generators from the current
9+
// body. This then caused a query cycle.
10+
11+
struct W<T>(*const T);
12+
13+
impl<T: Send> Clone for W<T> {
14+
fn clone(&self) -> Self { W(self.0) }
15+
}
16+
17+
impl<T: Send> Copy for W<T> {}
18+
19+
fn main() {
20+
let coro = async {};
21+
let x = W(&raw const coro);
22+
let c = || {
23+
let x = x;
24+
};
25+
}

0 commit comments

Comments
 (0)