diff options
author | Lukas Wirth <[email protected]> | 2021-06-17 12:59:31 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-17 12:59:31 +0100 |
commit | 9353f36516e5b4026ce3a181d578c3a63876a18f (patch) | |
tree | 2909822a4406e05f66a79b180ce1d2327062b5f1 /crates/ide_completion/src/tests | |
parent | 2225db2eb48bd8c8fdf399c50652d3f95c851ace (diff) |
Fix incorrect completions in empty braced use statement
Diffstat (limited to 'crates/ide_completion/src/tests')
-rw-r--r-- | crates/ide_completion/src/tests/use_tree.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ide_completion/src/tests/use_tree.rs b/crates/ide_completion/src/tests/use_tree.rs index 878bc42bf..7e6748ccc 100644 --- a/crates/ide_completion/src/tests/use_tree.rs +++ b/crates/ide_completion/src/tests/use_tree.rs | |||
@@ -236,3 +236,20 @@ pub use $0; | |||
236 | "#]], | 236 | "#]], |
237 | ); | 237 | ); |
238 | } | 238 | } |
239 | |||
240 | #[test] | ||
241 | fn use_tree_braces_at_start() { | ||
242 | check( | ||
243 | r#" | ||
244 | struct X; | ||
245 | mod bar {} | ||
246 | use {$0}; | ||
247 | "#, | ||
248 | expect![[r#" | ||
249 | kw crate:: | ||
250 | kw self:: | ||
251 | kw super:: | ||
252 | md bar | ||
253 | "#]], | ||
254 | ); | ||
255 | } | ||