diff --git a/crates/hir-ty/src/display.rs b/crates/hir-ty/src/display.rs index 3cfe78141d4..22326990299 100644 --- a/crates/hir-ty/src/display.rs +++ b/crates/hir-ty/src/display.rs @@ -304,6 +304,7 @@ pub struct HirDisplayWrapper<'a, T> { pub enum ClosureStyle { /// `impl FnX(i32, i32) -> i32`, where `FnX` is the most special trait between `Fn`, `FnMut`, `FnOnce` that the /// closure implements. This is the default. + // FIXME: Allow rendering non capturing closures as plain function pointers? ImplFn, /// `|i32, i32| -> i32` RANotation, diff --git a/crates/ide/src/inlay_hints/closure_captures.rs b/crates/ide/src/inlay_hints/closure_captures.rs index ddede5239e5..d7e5332c41d 100644 --- a/crates/ide/src/inlay_hints/closure_captures.rs +++ b/crates/ide/src/inlay_hints/closure_captures.rs @@ -121,11 +121,11 @@ fn main() { // ^ move // ^ ( // ^ &foo -// ^ , +// ^ , $ // ^ bar -// ^ , +// ^ , $ // ^ baz -// ^ , +// ^ , $ // ^ qux // ^ ) foo; @@ -137,11 +137,11 @@ fn main() { // ^ move // ^ ( // ^ &foo -// ^ , +// ^ , $ // ^ &bar -// ^ , +// ^ , $ // ^ &baz -// ^ , +// ^ , $ // ^ &qux // ^ ) &foo; @@ -161,7 +161,7 @@ fn main() { // ^ move // ^ ( // ^ &mut baz -// ^ , +// ^ , $ // ^ &mut qux // ^ ) baz = NonCopy;