From abcdb4bc7d06985bbe03780c73cd395af2272c6c Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 5 May 2023 14:18:27 +0200 Subject: [PATCH] Fix test fixtures --- crates/hir-ty/src/display.rs | 1 + crates/ide/src/inlay_hints/closure_captures.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/crates/hir-ty/src/display.rs b/crates/hir-ty/src/display.rs index 3cfe78141d..2232699029 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 ddede5239e..d7e5332c41 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;