We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 54eae59 + ee9bdca commit c781c9aCopy full SHA for c781c9a
tests/ui/coroutine/dont-drop-stalled-generators.rs
@@ -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