From 6efc79b89d50b1b2ad9127afb2073bebe4b35290 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 7 Aug 2019 15:14:22 +0200 Subject: implement while let desugaring --- crates/ra_ide_api/src/inlay_hints.rs | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/inlay_hints.rs b/crates/ra_ide_api/src/inlay_hints.rs index 7b9190314..0b3c96d26 100644 --- a/crates/ra_ide_api/src/inlay_hints.rs +++ b/crates/ra_ide_api/src/inlay_hints.rs @@ -414,13 +414,35 @@ fn main() { }"#, ); - assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r#"[ - InlayHint { - range: [166; 170), - kind: TypeHint, - label: "CustomOption", - }, -]"# + assert_debug_snapshot_matches!(analysis.inlay_hints(file_id).unwrap(), @r###" + ⋮[ + ⋮ InlayHint { + ⋮ range: [166; 170), + ⋮ kind: TypeHint, + ⋮ label: "CustomOption", + ⋮ }, + ⋮ InlayHint { + ⋮ range: [343; 347), + ⋮ kind: TypeHint, + ⋮ label: "&Test", + ⋮ }, + ⋮ InlayHint { + ⋮ range: [401; 402), + ⋮ kind: TypeHint, + ⋮ label: "&CustomOption", + ⋮ }, + ⋮ InlayHint { + ⋮ range: [404; 405), + ⋮ kind: TypeHint, + ⋮ label: "&u8", + ⋮ }, + ⋮ InlayHint { + ⋮ range: [549; 550), + ⋮ kind: TypeHint, + ⋮ label: "&u32", + ⋮ }, + ⋮] + "### ); } -- cgit v1.2.3