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) + "#]], + ); +}