aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-06-19 21:31:24 +0100
committerLukas Wirth <[email protected]>2021-06-19 21:33:29 +0100
commit2113c467970ed80155bd4c6d8c5efa7dc0c114d1 (patch)
tree349e09755a03480e318d32acd322bbee78787abd /crates/ide_assists/src
parentc2aa7782d65c4f2765f68b99f00f4203e1f143c1 (diff)
Cleanup insert_use tests
Diffstat (limited to 'crates/ide_assists/src')
-rw-r--r--crates/ide_assists/src/handlers/auto_import.rs58
1 files changed, 0 insertions, 58 deletions
diff --git a/crates/ide_assists/src/handlers/auto_import.rs b/crates/ide_assists/src/handlers/auto_import.rs
index 8df8b060d..accc345fc 100644
--- a/crates/ide_assists/src/handlers/auto_import.rs
+++ b/crates/ide_assists/src/handlers/auto_import.rs
@@ -995,62 +995,4 @@ const _: () = {
995"#, 995"#,
996 ); 996 );
997 } 997 }
998
999 #[test]
1000 fn respects_cfg_attr() {
1001 check_assist(
1002 auto_import,
1003 r#"
1004mod bar {
1005 pub struct Bar;
1006}
1007
1008#[cfg(test)]
1009fn foo() {
1010 Bar$0
1011}
1012"#,
1013 r#"
1014mod bar {
1015 pub struct Bar;
1016}
1017
1018#[cfg(test)]
1019fn foo() {
1020use bar::Bar;
1021
1022 Bar
1023}
1024"#,
1025 );
1026 }
1027
1028 #[test]
1029 fn respects_cfg_attr2() {
1030 check_assist(
1031 auto_import,
1032 r#"
1033mod bar {
1034 pub struct Bar;
1035}
1036
1037#[cfg(test)]
1038const FOO: Bar = {
1039 Bar$0
1040}
1041"#,
1042 r#"
1043mod bar {
1044 pub struct Bar;
1045}
1046
1047#[cfg(test)]
1048const FOO: Bar = {
1049use bar::Bar;
1050
1051 Bar
1052}
1053"#,
1054 );
1055 }
1056} 998}