From 53bb46fa853bee99f673a0ed0a53798c46847d99 Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Sat, 6 Mar 2021 16:56:07 -0800 Subject: show function params in completion detail --- .../src/completions/unqualified_path.rs | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'crates/ide_completion/src/completions/unqualified_path.rs') diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs index 044dfd160..e4bf4a043 100644 --- a/crates/ide_completion/src/completions/unqualified_path.rs +++ b/crates/ide_completion/src/completions/unqualified_path.rs @@ -139,7 +139,7 @@ fn quux(x: i32) { expect![[r#" lc y i32 lc x i32 - fn quux(…) -> () + fn quux(…) fn(i32) "#]], ); } @@ -161,7 +161,7 @@ fn quux() { expect![[r#" lc b i32 lc a - fn quux() -> () + fn quux() fn() "#]], ); } @@ -176,7 +176,7 @@ fn quux() { "#, expect![[r#" lc x - fn quux() -> () + fn quux() fn() "#]], ); } @@ -207,14 +207,14 @@ fn main() { r#"fn quux() { $0 }"#, expect![[r#" tp T - fn quux() -> () + fn quux() fn() "#]], ); check( r#"fn quux() { $0 }"#, expect![[r#" cp C - fn quux() -> () + fn quux() fn() "#]], ); } @@ -225,7 +225,7 @@ fn main() { check( r#"fn quux<'a>() { $0 }"#, expect![[r#" - fn quux() -> () + fn quux() fn() "#]], ); } @@ -263,7 +263,7 @@ fn quux() { $0 } "#, expect![[r#" st S - fn quux() -> () + fn quux() fn() en E "#]], ); @@ -316,7 +316,7 @@ mod m { } "#, expect![[r#" - fn quux() -> () + fn quux() fn() st Bar "#]], ); @@ -331,7 +331,7 @@ fn x() -> $0 "#, expect![[r#" st Foo - fn x() -> () + fn x() fn() "#]], ); } @@ -352,7 +352,7 @@ fn foo() { expect![[r#" lc bar i32 lc bar i32 - fn foo() -> () + fn foo() fn() "#]], ); } @@ -382,7 +382,7 @@ use prelude::*; mod prelude { struct Option; } "#, expect![[r#" - fn foo() -> () + fn foo() fn() md std st Option "#]], @@ -412,7 +412,7 @@ mod macros { } "#, expect![[r##" - fn f() -> () + fn f() fn() ma concat!(…) #[macro_export] macro_rules! concat md std "##]], @@ -439,7 +439,7 @@ use prelude::*; mod prelude { struct String; } "#, expect![[r#" - fn foo() -> () + fn foo() fn() md std md core st String @@ -470,7 +470,7 @@ fn main() { let v = $0 } expect![[r##" md m1 ma baz!(…) #[macro_export] macro_rules! baz - fn main() -> () + fn main() fn() md m2 ma bar!(…) macro_rules! bar ma foo!(…) macro_rules! foo @@ -486,7 +486,7 @@ macro_rules! foo { () => {} } fn foo() { $0 } "#, expect![[r#" - fn foo() -> () + fn foo() fn() ma foo!(…) macro_rules! foo "#]], ); @@ -500,7 +500,7 @@ macro_rules! foo { () => {} } fn main() { let x: $0 } "#, expect![[r#" - fn main() -> () + fn main() fn() ma foo!(…) macro_rules! foo "#]], ); @@ -514,7 +514,7 @@ macro_rules! foo { () => {} } fn main() { $0 } "#, expect![[r#" - fn main() -> () + fn main() fn() ma foo!(…) macro_rules! foo "#]], ); @@ -530,8 +530,8 @@ fn main() { } "#, expect![[r#" - fn frobnicate() -> () - fn main() -> () + fn frobnicate() fn() + fn main() fn() "#]], ); } @@ -549,7 +549,7 @@ fn quux(x: i32) { expect![[r#" lc y i32 lc x i32 - fn quux(…) -> () + fn quux(…) fn(i32) ma m!(…) macro_rules! m "#]], ); @@ -568,7 +568,7 @@ fn quux(x: i32) { expect![[r#" lc y i32 lc x i32 - fn quux(…) -> () + fn quux(…) fn(i32) ma m!(…) macro_rules! m "#]], ); @@ -587,7 +587,7 @@ fn quux(x: i32) { expect![[r#" lc y i32 lc x i32 - fn quux(…) -> () + fn quux(…) fn(i32) ma m!(…) macro_rules! m "#]], ); @@ -602,7 +602,7 @@ use spam::Quux; fn main() { $0 } "#, expect![[r#" - fn main() -> () + fn main() fn() ?? Quux "#]], ); @@ -680,7 +680,7 @@ fn main() { let foo: Foo = Q$0 } ev Foo::Baz () ev Foo::Quux () en Foo - fn main() -> () + fn main() fn() "#]], ) } @@ -695,7 +695,7 @@ fn f() -> m::E { V$0 } expect![[r#" ev m::E::V () md m - fn f() -> E + fn f() fn() -> E "#]], ) } -- cgit v1.2.3