Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints.rs')
| -rw-r--r-- | crates/ide/src/inlay_hints.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs index f51d7f5207..0d2239c71f 100644 --- a/crates/ide/src/inlay_hints.rs +++ b/crates/ide/src/inlay_hints.rs @@ -235,7 +235,7 @@ fn hints( param_name::hints(hints, famous_defs, config, file_id, ast::Expr::from(it)) } ast::Expr::ClosureExpr(it) => { - closure_captures::hints(hints, famous_defs, config, it.clone()); + closure_captures::hints(hints, famous_defs, config, it.clone(), file_id.edition(sema.db)); closure_ret::hints(hints, famous_defs, config, display_target, it) }, ast::Expr::RangeExpr(it) => range_exclusive::hints(hints, famous_defs, config, it), @@ -1085,9 +1085,10 @@ fn foo() { fn closure_dependency_cycle_no_panic() { check( r#" +//- minicore: fn fn foo() { let closure; - // ^^^^^^^ impl Fn() + // ^^^^^^^ impl FnOnce() closure = || { closure(); }; @@ -1095,9 +1096,9 @@ fn foo() { fn bar() { let closure1; - // ^^^^^^^^ impl Fn() + // ^^^^^^^^ impl FnOnce() let closure2; - // ^^^^^^^^ impl Fn() + // ^^^^^^^^ impl FnOnce() closure1 = || { closure2(); }; |