Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints/closure_captures.rs')
| -rw-r--r-- | crates/ide/src/inlay_hints/closure_captures.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ide/src/inlay_hints/closure_captures.rs b/crates/ide/src/inlay_hints/closure_captures.rs index 3f0e4e7b05..dc36bd776d 100644 --- a/crates/ide/src/inlay_hints/closure_captures.rs +++ b/crates/ide/src/inlay_hints/closure_captures.rs @@ -267,6 +267,25 @@ fn main() { } #[test] + fn nested_coroutine_does_not_capture_parent_local() { + check_with_config( + InlayHintsConfig { closure_capture_hints: true, ..DISABLED_CONFIG }, + r#" +//- minicore: copy, future +fn main() { + async { + let foo = 1; + async { + // ^ move(&foo) + foo; + } + }; +} +"#, + ); + } + + #[test] fn coroutine_blocks() { check_with_config( InlayHintsConfig { closure_capture_hints: true, ..DISABLED_CONFIG }, |