From 9ea6ee6b2785da02ff1963fbbc2eea340450905c Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 16 Jun 2021 17:56:04 +0200 Subject: Don't show incorrect completions after unsafe or visiblity node --- crates/ide_completion/src/tests/item_list.rs | 34 ++++++++-------------------- 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'crates/ide_completion/src/tests') diff --git a/crates/ide_completion/src/tests/item_list.rs b/crates/ide_completion/src/tests/item_list.rs index e7b77d7e7..c8aa44d88 100644 --- a/crates/ide_completion/src/tests/item_list.rs +++ b/crates/ide_completion/src/tests/item_list.rs @@ -16,11 +16,11 @@ fn in_mod_item_list() { kw fn kw const kw type - kw use kw impl + kw extern + kw use kw trait kw static - kw extern kw mod kw enum kw struct @@ -51,11 +51,11 @@ $0"#, kw fn kw const kw type - kw use kw impl + kw extern + kw use kw trait kw static - kw extern kw mod kw enum kw struct @@ -89,11 +89,11 @@ crate::$0"#, kw fn kw const kw type - kw use kw impl + kw extern + kw use kw trait kw static - kw extern kw mod kw enum kw struct @@ -119,17 +119,11 @@ mod bar {} const CONST: () = (); unsafe $0"#, - expect![[r##" + expect![[r#" kw fn kw trait kw impl - sn tmod (Test module) - sn tfn (Test function) - sn macro_rules - md bar - ma foo!(…) #[macro_export] macro_rules! foo - ma foo!(…) #[macro_export] macro_rules! foo - "##]], + "#]], ); } @@ -145,26 +139,18 @@ mod bar {} const CONST: () = (); pub $0"#, - expect![[r##" + expect![[r#" kw unsafe kw fn kw const kw type kw use - kw impl kw trait kw static - kw extern kw mod kw enum kw struct kw union - sn tmod (Test module) - sn tfn (Test function) - sn macro_rules - md bar - ma foo!(…) #[macro_export] macro_rules! foo - ma foo!(…) #[macro_export] macro_rules! foo - "##]], + "#]], ); } -- cgit v1.2.3