|
| 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