diff options
Diffstat (limited to 'tests/ui/traits/next-solver/opaques/revealing-use-in-nested-body.rs')
| -rw-r--r-- | tests/ui/traits/next-solver/opaques/revealing-use-in-nested-body.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/traits/next-solver/opaques/revealing-use-in-nested-body.rs b/tests/ui/traits/next-solver/opaques/revealing-use-in-nested-body.rs new file mode 100644 index 00000000000..b79926eebda --- /dev/null +++ b/tests/ui/traits/next-solver/opaques/revealing-use-in-nested-body.rs @@ -0,0 +1,11 @@ +// Regression test for #137751. This previously ICE'd as +// we did not provide the hidden type of the opaque inside +// of the async block. This caused borrowck of the recursive +// call to ICE. + +//@ edition: 2021 +//@ check-pass +async fn test() { + Box::pin(test()).await; +} +fn main() {} |
