diff options
author | Kevin DeLorey <[email protected]> | 2020-02-09 16:25:47 +0000 |
---|---|---|
committer | Kevin DeLorey <[email protected]> | 2020-02-09 16:37:43 +0000 |
commit | a957c473fdb79880c39b73dc9e0c923093cf16ac (patch) | |
tree | f998b548f530ce604651e0e6af314ed2ec74b3b5 /crates/ra_ide/src/inlay_hints.rs | |
parent | 22caf982b99c54058e2e9200aeea0e61cada284a (diff) | |
parent | 1b9b13b4b4a75b5531c3f046ce6bf72d681f2732 (diff) |
Merge branch 'master' into kdelorey/complete-trait-impl
Diffstat (limited to 'crates/ra_ide/src/inlay_hints.rs')
-rw-r--r-- | crates/ra_ide/src/inlay_hints.rs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index 393ca9447..6b0d3d996 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs | |||
@@ -2,13 +2,14 @@ | |||
2 | 2 | ||
3 | use hir::{HirDisplay, SourceAnalyzer, SourceBinder}; | 3 | use hir::{HirDisplay, SourceAnalyzer, SourceBinder}; |
4 | use once_cell::unsync::Lazy; | 4 | use once_cell::unsync::Lazy; |
5 | use ra_ide_db::RootDatabase; | ||
5 | use ra_prof::profile; | 6 | use ra_prof::profile; |
6 | use ra_syntax::{ | 7 | use ra_syntax::{ |
7 | ast::{self, ArgListOwner, AstNode, TypeAscriptionOwner}, | 8 | ast::{self, ArgListOwner, AstNode, TypeAscriptionOwner}, |
8 | match_ast, SmolStr, SourceFile, SyntaxKind, SyntaxNode, TextRange, | 9 | match_ast, SmolStr, SourceFile, SyntaxKind, SyntaxNode, TextRange, |
9 | }; | 10 | }; |
10 | 11 | ||
11 | use crate::{db::RootDatabase, FileId, FunctionSignature}; | 12 | use crate::{FileId, FunctionSignature}; |
12 | 13 | ||
13 | #[derive(Debug, PartialEq, Eq)] | 14 | #[derive(Debug, PartialEq, Eq)] |
14 | pub enum InlayKind { | 15 | pub enum InlayKind { |
@@ -376,7 +377,7 @@ fn main() { | |||
376 | let mut start = 0; | 377 | let mut start = 0; |
377 | (0..2).for_each(|increment| { | 378 | (0..2).for_each(|increment| { |
378 | start += increment; | 379 | start += increment; |
379 | }) | 380 | }); |
380 | 381 | ||
381 | let multiply = |a, b, c, d| a * b * c * d; | 382 | let multiply = |a, b, c, d| a * b * c * d; |
382 | let _: i32 = multiply(1, 2, 3, 4); | 383 | let _: i32 = multiply(1, 2, 3, 4); |
@@ -399,37 +400,37 @@ fn main() { | |||
399 | label: "i32", | 400 | label: "i32", |
400 | }, | 401 | }, |
401 | InlayHint { | 402 | InlayHint { |
402 | range: [114; 122), | 403 | range: [115; 123), |
403 | kind: TypeHint, | 404 | kind: TypeHint, |
404 | label: "|…| -> i32", | 405 | label: "|…| -> i32", |
405 | }, | 406 | }, |
406 | InlayHint { | 407 | InlayHint { |
407 | range: [126; 127), | 408 | range: [127; 128), |
408 | kind: TypeHint, | 409 | kind: TypeHint, |
409 | label: "i32", | 410 | label: "i32", |
410 | }, | 411 | }, |
411 | InlayHint { | 412 | InlayHint { |
412 | range: [129; 130), | 413 | range: [130; 131), |
413 | kind: TypeHint, | 414 | kind: TypeHint, |
414 | label: "i32", | 415 | label: "i32", |
415 | }, | 416 | }, |
416 | InlayHint { | 417 | InlayHint { |
417 | range: [132; 133), | 418 | range: [133; 134), |
418 | kind: TypeHint, | 419 | kind: TypeHint, |
419 | label: "i32", | 420 | label: "i32", |
420 | }, | 421 | }, |
421 | InlayHint { | 422 | InlayHint { |
422 | range: [135; 136), | 423 | range: [136; 137), |
423 | kind: TypeHint, | 424 | kind: TypeHint, |
424 | label: "i32", | 425 | label: "i32", |
425 | }, | 426 | }, |
426 | InlayHint { | 427 | InlayHint { |
427 | range: [200; 212), | 428 | range: [201; 213), |
428 | kind: TypeHint, | 429 | kind: TypeHint, |
429 | label: "&|…| -> i32", | 430 | label: "&|…| -> i32", |
430 | }, | 431 | }, |
431 | InlayHint { | 432 | InlayHint { |
432 | range: [235; 244), | 433 | range: [236; 245), |
433 | kind: TypeHint, | 434 | kind: TypeHint, |
434 | label: "|| -> i32", | 435 | label: "|| -> i32", |
435 | }, | 436 | }, |