From ca4557ac524c104bff03d5f6dfc7bece7c919608 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sun, 23 Feb 2020 01:23:33 +0300 Subject: Fix the tests --- crates/ra_ide/src/inlay_hints.rs | 110 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 5 deletions(-) diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index 09a463a4b..8d1c447ef 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs @@ -284,11 +284,6 @@ fn main() { kind: TypeHint, label: "i32", }, - InlayHint { - range: [584; 585), - kind: TypeHint, - label: "i32", - }, InlayHint { range: [577; 578), kind: TypeHint, @@ -299,6 +294,11 @@ fn main() { kind: TypeHint, label: "f64", }, + InlayHint { + range: [584; 585), + kind: TypeHint, + label: "i32", + }, InlayHint { range: [627; 628), kind: TypeHint, @@ -446,6 +446,11 @@ fn main() { kind: TypeHint, label: "CustomOption", }, + InlayHint { + range: [287; 291), + kind: TypeHint, + label: "&CustomOption", + }, InlayHint { range: [334; 338), kind: TypeHint, @@ -461,11 +466,36 @@ fn main() { kind: TypeHint, label: "&u8", }, + InlayHint { + range: [449; 450), + kind: TypeHint, + label: "&CustomOption", + }, + InlayHint { + range: [455; 456), + kind: TypeHint, + label: "&u8", + }, InlayHint { range: [531; 532), kind: TypeHint, label: "&u32", }, + InlayHint { + range: [538; 539), + kind: TypeHint, + label: "&u8", + }, + InlayHint { + range: [618; 619), + kind: TypeHint, + label: "&u8", + }, + InlayHint { + range: [675; 676), + kind: TypeHint, + label: "&u8", + }, ] "### ); @@ -509,6 +539,11 @@ fn main() { kind: TypeHint, label: "CustomOption", }, + InlayHint { + range: [293; 297), + kind: TypeHint, + label: "&CustomOption", + }, InlayHint { range: [343; 347), kind: TypeHint, @@ -524,11 +559,36 @@ fn main() { kind: TypeHint, label: "&u8", }, + InlayHint { + range: [464; 465), + kind: TypeHint, + label: "&CustomOption", + }, + InlayHint { + range: [470; 471), + kind: TypeHint, + label: "&u8", + }, InlayHint { range: [549; 550), kind: TypeHint, label: "&u32", }, + InlayHint { + range: [556; 557), + kind: TypeHint, + label: "&u8", + }, + InlayHint { + range: [639; 640), + kind: TypeHint, + label: "&u8", + }, + InlayHint { + range: [699; 700), + kind: TypeHint, + label: "&u8", + }, ] "### ); @@ -567,6 +627,11 @@ fn main() { assert_debug_snapshot!(analysis.inlay_hints(file_id, None).unwrap(), @r###" [ + InlayHint { + range: [272; 276), + kind: TypeHint, + label: "CustomOption", + }, InlayHint { range: [311; 315), kind: TypeHint, @@ -582,11 +647,36 @@ fn main() { kind: TypeHint, label: "u8", }, + InlayHint { + range: [410; 411), + kind: TypeHint, + label: "CustomOption", + }, + InlayHint { + range: [416; 417), + kind: TypeHint, + label: "u8", + }, InlayHint { range: [484; 485), kind: TypeHint, label: "u32", }, + InlayHint { + range: [491; 492), + kind: TypeHint, + label: "u8", + }, + InlayHint { + range: [563; 564), + kind: TypeHint, + label: "u8", + }, + InlayHint { + range: [612; 613), + kind: TypeHint, + label: "u8", + }, ] "### ); @@ -676,11 +766,21 @@ fn main() { kind: ParameterHint, label: "msg", }, + InlayHint { + range: [277; 288), + kind: ParameterHint, + label: "last", + }, InlayHint { range: [331; 334), kind: ParameterHint, label: "param", }, + InlayHint { + range: [354; 356), + kind: ParameterHint, + label: "&self", + }, InlayHint { range: [358; 362), kind: ParameterHint, -- cgit v1.2.3