From efc96b2c6088f7e4b545867d120f356973eb2ff3 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 15 Jul 2021 22:23:34 +0200 Subject: [PATCH] Add regression test fo #7222 --- crates/ide_completion/src/tests/use_tree.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/crates/ide_completion/src/tests/use_tree.rs b/crates/ide_completion/src/tests/use_tree.rs index cb626046f4..a4017e937f 100644 --- a/crates/ide_completion/src/tests/use_tree.rs +++ b/crates/ide_completion/src/tests/use_tree.rs @@ -253,3 +253,19 @@ use {$0}; "#]], ); } + +#[test] +fn impl_prefix_does_not_add_fn_snippet() { + // regression test for 7222 + check( + r#" +mod foo { + pub fn bar(x: u32) {} +} +use self::foo::impl$0 +"#, + expect![[r#" + fn bar fn(u32) + "#]], + ); +}