diff options
author | Kirill Bulatov <[email protected]> | 2020-01-22 14:44:05 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-01-22 14:55:09 +0000 |
commit | 4029e4410245eeb2e1f58adefad1d4cc24898579 (patch) | |
tree | 96de0273a72ddf6a434a82e9db72df942cf1c51c /crates/ra_ide/src | |
parent | a5407ddc05826b208ed8a0026b2ae566bf0a8b70 (diff) |
Omit default parameters for reference types
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/inlay_hints.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index 236557541..393ca9447 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs | |||
@@ -245,6 +245,7 @@ struct Test<K, T = u8> { | |||
245 | 245 | ||
246 | fn main() { | 246 | fn main() { |
247 | let zz = Test { t: 23, k: 33 }; | 247 | let zz = Test { t: 23, k: 33 }; |
248 | let zz_ref = &zz; | ||
248 | }"#, | 249 | }"#, |
249 | ); | 250 | ); |
250 | 251 | ||
@@ -255,6 +256,11 @@ fn main() { | |||
255 | kind: TypeHint, | 256 | kind: TypeHint, |
256 | label: "Test<i32>", | 257 | label: "Test<i32>", |
257 | }, | 258 | }, |
259 | InlayHint { | ||
260 | range: [105; 111), | ||
261 | kind: TypeHint, | ||
262 | label: "&Test<i32>", | ||
263 | }, | ||
258 | ] | 264 | ] |
259 | "### | 265 | "### |
260 | ); | 266 | ); |
@@ -374,6 +380,7 @@ fn main() { | |||
374 | 380 | ||
375 | let multiply = |a, b, c, d| a * b * c * d; | 381 | let multiply = |a, b, c, d| a * b * c * d; |
376 | let _: i32 = multiply(1, 2, 3, 4); | 382 | let _: i32 = multiply(1, 2, 3, 4); |
383 | let multiply_ref = &multiply; | ||
377 | 384 | ||
378 | let return_42 = || 42; | 385 | let return_42 = || 42; |
379 | }"#, | 386 | }"#, |
@@ -417,7 +424,12 @@ fn main() { | |||
417 | label: "i32", | 424 | label: "i32", |
418 | }, | 425 | }, |
419 | InlayHint { | 426 | InlayHint { |
420 | range: [201; 210), | 427 | range: [200; 212), |
428 | kind: TypeHint, | ||
429 | label: "&|…| -> i32", | ||
430 | }, | ||
431 | InlayHint { | ||
432 | range: [235; 244), | ||
421 | kind: TypeHint, | 433 | kind: TypeHint, |
422 | label: "|| -> i32", | 434 | label: "|| -> i32", |
423 | }, | 435 | }, |