Skip to content

Commit efc96b2

Browse files
committed
Add regression test fo #7222
1 parent f39a250 commit efc96b2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

crates/ide_completion/src/tests/use_tree.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,19 @@ use {$0};
253253
"#]],
254254
);
255255
}
256+
257+
#[test]
258+
fn impl_prefix_does_not_add_fn_snippet() {
259+
// regression test for 7222
260+
check(
261+
r#"
262+
mod foo {
263+
pub fn bar(x: u32) {}
264+
}
265+
use self::foo::impl$0
266+
"#,
267+
expect![[r#"
268+
fn bar fn(u32)
269+
"#]],
270+
);
271+
}

0 commit comments

Comments
 (0)