diff options
Diffstat (limited to 'crates/assists/src/handlers')
-rw-r--r-- | crates/assists/src/handlers/auto_import.rs | 5 | ||||
-rw-r--r-- | crates/assists/src/handlers/extract_struct_from_enum_variant.rs | 16 | ||||
-rw-r--r-- | crates/assists/src/handlers/fill_match_arms.rs | 9 | ||||
-rw-r--r-- | crates/assists/src/handlers/generate_from_impl_for_enum.rs | 3 | ||||
-rw-r--r-- | crates/assists/src/handlers/infer_function_return_type.rs | 24 | ||||
-rw-r--r-- | crates/assists/src/handlers/merge_imports.rs | 6 | ||||
-rw-r--r-- | crates/assists/src/handlers/qualify_path.rs | 2 | ||||
-rw-r--r-- | crates/assists/src/handlers/replace_derive_with_manual_impl.rs | 4 | ||||
-rw-r--r-- | crates/assists/src/handlers/replace_qualified_name_with_use.rs | 8 | ||||
-rw-r--r-- | crates/assists/src/handlers/toggle_ignore.rs (renamed from crates/assists/src/handlers/ignore_test.rs) | 23 |
10 files changed, 51 insertions, 49 deletions
diff --git a/crates/assists/src/handlers/auto_import.rs b/crates/assists/src/handlers/auto_import.rs index d665837a2..bd5bba646 100644 --- a/crates/assists/src/handlers/auto_import.rs +++ b/crates/assists/src/handlers/auto_import.rs | |||
@@ -1,8 +1,11 @@ | |||
1 | use ide_db::helpers::{ | ||
2 | insert_use::{insert_use, ImportScope}, | ||
3 | mod_path_to_ast, | ||
4 | }; | ||
1 | use syntax::ast; | 5 | use syntax::ast; |
2 | 6 | ||
3 | use crate::{ | 7 | use crate::{ |
4 | utils::import_assets::{ImportAssets, ImportCandidate}, | 8 | utils::import_assets::{ImportAssets, ImportCandidate}, |
5 | utils::{insert_use, mod_path_to_ast, ImportScope}, | ||
6 | AssistContext, AssistId, AssistKind, Assists, GroupLabel, | 9 | AssistContext, AssistId, AssistKind, Assists, GroupLabel, |
7 | }; | 10 | }; |
8 | 11 | ||
diff --git a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs index cac77c49b..d85767b4e 100644 --- a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs | |||
@@ -2,6 +2,10 @@ use std::iter; | |||
2 | 2 | ||
3 | use either::Either; | 3 | use either::Either; |
4 | use hir::{AsName, EnumVariant, Module, ModuleDef, Name}; | 4 | use hir::{AsName, EnumVariant, Module, ModuleDef, Name}; |
5 | use ide_db::helpers::{ | ||
6 | insert_use::{insert_use, ImportScope}, | ||
7 | mod_path_to_ast, | ||
8 | }; | ||
5 | use ide_db::{defs::Definition, search::Reference, RootDatabase}; | 9 | use ide_db::{defs::Definition, search::Reference, RootDatabase}; |
6 | use rustc_hash::{FxHashMap, FxHashSet}; | 10 | use rustc_hash::{FxHashMap, FxHashSet}; |
7 | use syntax::{ | 11 | use syntax::{ |
@@ -10,10 +14,7 @@ use syntax::{ | |||
10 | SourceFile, SyntaxElement, SyntaxNode, T, | 14 | SourceFile, SyntaxElement, SyntaxNode, T, |
11 | }; | 15 | }; |
12 | 16 | ||
13 | use crate::{ | 17 | use crate::{AssistContext, AssistId, AssistKind, Assists}; |
14 | utils::{insert_use, mod_path_to_ast, ImportScope}, | ||
15 | AssistContext, AssistId, AssistKind, Assists, | ||
16 | }; | ||
17 | 18 | ||
18 | // Assist: extract_struct_from_enum_variant | 19 | // Assist: extract_struct_from_enum_variant |
19 | // | 20 | // |
@@ -236,10 +237,9 @@ fn update_reference( | |||
236 | 237 | ||
237 | #[cfg(test)] | 238 | #[cfg(test)] |
238 | mod tests { | 239 | mod tests { |
239 | use crate::{ | 240 | use ide_db::helpers::FamousDefs; |
240 | tests::{check_assist, check_assist_not_applicable}, | 241 | |
241 | utils::FamousDefs, | 242 | use crate::tests::{check_assist, check_assist_not_applicable}; |
242 | }; | ||
243 | 243 | ||
244 | use super::*; | 244 | use super::*; |
245 | 245 | ||
diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index eda45f5b3..ef12ef0cf 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs | |||
@@ -1,13 +1,14 @@ | |||
1 | use std::iter; | 1 | use std::iter; |
2 | 2 | ||
3 | use hir::{Adt, HasSource, ModuleDef, Semantics}; | 3 | use hir::{Adt, HasSource, ModuleDef, Semantics}; |
4 | use ide_db::helpers::{mod_path_to_ast, FamousDefs}; | ||
4 | use ide_db::RootDatabase; | 5 | use ide_db::RootDatabase; |
5 | use itertools::Itertools; | 6 | use itertools::Itertools; |
6 | use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; | 7 | use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; |
7 | use test_utils::mark; | 8 | use test_utils::mark; |
8 | 9 | ||
9 | use crate::{ | 10 | use crate::{ |
10 | utils::{mod_path_to_ast, render_snippet, Cursor, FamousDefs}, | 11 | utils::{render_snippet, Cursor}, |
11 | AssistContext, AssistId, AssistKind, Assists, | 12 | AssistContext, AssistId, AssistKind, Assists, |
12 | }; | 13 | }; |
13 | 14 | ||
@@ -212,12 +213,10 @@ fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> O | |||
212 | 213 | ||
213 | #[cfg(test)] | 214 | #[cfg(test)] |
214 | mod tests { | 215 | mod tests { |
216 | use ide_db::helpers::FamousDefs; | ||
215 | use test_utils::mark; | 217 | use test_utils::mark; |
216 | 218 | ||
217 | use crate::{ | 219 | use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target}; |
218 | tests::{check_assist, check_assist_not_applicable, check_assist_target}, | ||
219 | utils::FamousDefs, | ||
220 | }; | ||
221 | 220 | ||
222 | use super::fill_match_arms; | 221 | use super::fill_match_arms; |
223 | 222 | ||
diff --git a/crates/assists/src/handlers/generate_from_impl_for_enum.rs b/crates/assists/src/handlers/generate_from_impl_for_enum.rs index 674e5a175..3c374e5d9 100644 --- a/crates/assists/src/handlers/generate_from_impl_for_enum.rs +++ b/crates/assists/src/handlers/generate_from_impl_for_enum.rs | |||
@@ -1,8 +1,9 @@ | |||
1 | use ide_db::helpers::FamousDefs; | ||
1 | use ide_db::RootDatabase; | 2 | use ide_db::RootDatabase; |
2 | use syntax::ast::{self, AstNode, NameOwner}; | 3 | use syntax::ast::{self, AstNode, NameOwner}; |
3 | use test_utils::mark; | 4 | use test_utils::mark; |
4 | 5 | ||
5 | use crate::{utils::FamousDefs, AssistContext, AssistId, AssistKind, Assists}; | 6 | use crate::{AssistContext, AssistId, AssistKind, Assists}; |
6 | 7 | ||
7 | // Assist: generate_from_impl_for_enum | 8 | // Assist: generate_from_impl_for_enum |
8 | // | 9 | // |
diff --git a/crates/assists/src/handlers/infer_function_return_type.rs b/crates/assists/src/handlers/infer_function_return_type.rs index 520d07ae0..aa584eb03 100644 --- a/crates/assists/src/handlers/infer_function_return_type.rs +++ b/crates/assists/src/handlers/infer_function_return_type.rs | |||
@@ -17,7 +17,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists}; | |||
17 | // fn foo() -> i32 { 42i32 } | 17 | // fn foo() -> i32 { 42i32 } |
18 | // ``` | 18 | // ``` |
19 | pub(crate) fn infer_function_return_type(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | 19 | pub(crate) fn infer_function_return_type(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { |
20 | let (tail_expr, builder_edit_pos, wrap_expr) = extract_tail(ctx)?; | 20 | let (fn_type, tail_expr, builder_edit_pos) = extract_tail(ctx)?; |
21 | let module = ctx.sema.scope(tail_expr.syntax()).module()?; | 21 | let module = ctx.sema.scope(tail_expr.syntax()).module()?; |
22 | let ty = ctx.sema.type_of_expr(&tail_expr)?; | 22 | let ty = ctx.sema.type_of_expr(&tail_expr)?; |
23 | if ty.is_unit() { | 23 | if ty.is_unit() { |
@@ -27,7 +27,10 @@ pub(crate) fn infer_function_return_type(acc: &mut Assists, ctx: &AssistContext) | |||
27 | 27 | ||
28 | acc.add( | 28 | acc.add( |
29 | AssistId("infer_function_return_type", AssistKind::RefactorRewrite), | 29 | AssistId("infer_function_return_type", AssistKind::RefactorRewrite), |
30 | "Add this function's return type", | 30 | match fn_type { |
31 | FnType::Function => "Add this function's return type", | ||
32 | FnType::Closure { .. } => "Add this closure's return type", | ||
33 | }, | ||
31 | tail_expr.syntax().text_range(), | 34 | tail_expr.syntax().text_range(), |
32 | |builder| { | 35 | |builder| { |
33 | match builder_edit_pos { | 36 | match builder_edit_pos { |
@@ -38,7 +41,7 @@ pub(crate) fn infer_function_return_type(acc: &mut Assists, ctx: &AssistContext) | |||
38 | builder.replace(text_range, &format!("-> {}", ty)) | 41 | builder.replace(text_range, &format!("-> {}", ty)) |
39 | } | 42 | } |
40 | } | 43 | } |
41 | if wrap_expr { | 44 | if let FnType::Closure { wrap_expr: true } = fn_type { |
42 | mark::hit!(wrap_closure_non_block_expr); | 45 | mark::hit!(wrap_closure_non_block_expr); |
43 | // `|x| x` becomes `|x| -> T x` which is invalid, so wrap it in a block | 46 | // `|x| x` becomes `|x| -> T x` which is invalid, so wrap it in a block |
44 | builder.replace(tail_expr.syntax().text_range(), &format!("{{{}}}", tail_expr)); | 47 | builder.replace(tail_expr.syntax().text_range(), &format!("{{{}}}", tail_expr)); |
@@ -72,8 +75,13 @@ fn ret_ty_to_action(ret_ty: Option<ast::RetType>, insert_pos: TextSize) -> Optio | |||
72 | } | 75 | } |
73 | } | 76 | } |
74 | 77 | ||
75 | fn extract_tail(ctx: &AssistContext) -> Option<(ast::Expr, InsertOrReplace, bool)> { | 78 | enum FnType { |
76 | let (tail_expr, return_type_range, action, wrap_expr) = | 79 | Function, |
80 | Closure { wrap_expr: bool }, | ||
81 | } | ||
82 | |||
83 | fn extract_tail(ctx: &AssistContext) -> Option<(FnType, ast::Expr, InsertOrReplace)> { | ||
84 | let (fn_type, tail_expr, return_type_range, action) = | ||
77 | if let Some(closure) = ctx.find_node_at_offset::<ast::ClosureExpr>() { | 85 | if let Some(closure) = ctx.find_node_at_offset::<ast::ClosureExpr>() { |
78 | let rpipe_pos = closure.param_list()?.syntax().last_token()?.text_range().end(); | 86 | let rpipe_pos = closure.param_list()?.syntax().last_token()?.text_range().end(); |
79 | let action = ret_ty_to_action(closure.ret_type(), rpipe_pos)?; | 87 | let action = ret_ty_to_action(closure.ret_type(), rpipe_pos)?; |
@@ -86,7 +94,7 @@ fn extract_tail(ctx: &AssistContext) -> Option<(ast::Expr, InsertOrReplace, bool | |||
86 | }; | 94 | }; |
87 | 95 | ||
88 | let ret_range = TextRange::new(rpipe_pos, body_start); | 96 | let ret_range = TextRange::new(rpipe_pos, body_start); |
89 | (tail_expr, ret_range, action, wrap_expr) | 97 | (FnType::Closure { wrap_expr }, tail_expr, ret_range, action) |
90 | } else { | 98 | } else { |
91 | let func = ctx.find_node_at_offset::<ast::Fn>()?; | 99 | let func = ctx.find_node_at_offset::<ast::Fn>()?; |
92 | let rparen_pos = func.param_list()?.r_paren_token()?.text_range().end(); | 100 | let rparen_pos = func.param_list()?.r_paren_token()?.text_range().end(); |
@@ -97,7 +105,7 @@ fn extract_tail(ctx: &AssistContext) -> Option<(ast::Expr, InsertOrReplace, bool | |||
97 | 105 | ||
98 | let ret_range_end = body.l_curly_token()?.text_range().start(); | 106 | let ret_range_end = body.l_curly_token()?.text_range().start(); |
99 | let ret_range = TextRange::new(rparen_pos, ret_range_end); | 107 | let ret_range = TextRange::new(rparen_pos, ret_range_end); |
100 | (tail_expr, ret_range, action, false) | 108 | (FnType::Function, tail_expr, ret_range, action) |
101 | }; | 109 | }; |
102 | let frange = ctx.frange.range; | 110 | let frange = ctx.frange.range; |
103 | if return_type_range.contains_range(frange) { | 111 | if return_type_range.contains_range(frange) { |
@@ -109,7 +117,7 @@ fn extract_tail(ctx: &AssistContext) -> Option<(ast::Expr, InsertOrReplace, bool | |||
109 | } else { | 117 | } else { |
110 | return None; | 118 | return None; |
111 | } | 119 | } |
112 | Some((tail_expr, action, wrap_expr)) | 120 | Some((fn_type, tail_expr, action)) |
113 | } | 121 | } |
114 | 122 | ||
115 | #[cfg(test)] | 123 | #[cfg(test)] |
diff --git a/crates/assists/src/handlers/merge_imports.rs b/crates/assists/src/handlers/merge_imports.rs index fd9c9e03c..b7e853994 100644 --- a/crates/assists/src/handlers/merge_imports.rs +++ b/crates/assists/src/handlers/merge_imports.rs | |||
@@ -1,3 +1,4 @@ | |||
1 | use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour}; | ||
1 | use syntax::{ | 2 | use syntax::{ |
2 | algo::{neighbor, SyntaxRewriter}, | 3 | algo::{neighbor, SyntaxRewriter}, |
3 | ast, AstNode, | 4 | ast, AstNode, |
@@ -5,10 +6,7 @@ use syntax::{ | |||
5 | 6 | ||
6 | use crate::{ | 7 | use crate::{ |
7 | assist_context::{AssistContext, Assists}, | 8 | assist_context::{AssistContext, Assists}, |
8 | utils::{ | 9 | utils::next_prev, |
9 | insert_use::{try_merge_imports, try_merge_trees}, | ||
10 | next_prev, MergeBehaviour, | ||
11 | }, | ||
12 | AssistId, AssistKind, | 10 | AssistId, AssistKind, |
13 | }; | 11 | }; |
14 | 12 | ||
diff --git a/crates/assists/src/handlers/qualify_path.rs b/crates/assists/src/handlers/qualify_path.rs index d5bc4e574..6f9810fe8 100644 --- a/crates/assists/src/handlers/qualify_path.rs +++ b/crates/assists/src/handlers/qualify_path.rs | |||
@@ -1,6 +1,7 @@ | |||
1 | use std::iter; | 1 | use std::iter; |
2 | 2 | ||
3 | use hir::AsName; | 3 | use hir::AsName; |
4 | use ide_db::helpers::mod_path_to_ast; | ||
4 | use ide_db::RootDatabase; | 5 | use ide_db::RootDatabase; |
5 | use syntax::{ | 6 | use syntax::{ |
6 | ast, | 7 | ast, |
@@ -12,7 +13,6 @@ use test_utils::mark; | |||
12 | use crate::{ | 13 | use crate::{ |
13 | assist_context::{AssistContext, Assists}, | 14 | assist_context::{AssistContext, Assists}, |
14 | utils::import_assets::{ImportAssets, ImportCandidate}, | 15 | utils::import_assets::{ImportAssets, ImportCandidate}, |
15 | utils::mod_path_to_ast, | ||
16 | AssistId, AssistKind, GroupLabel, | 16 | AssistId, AssistKind, GroupLabel, |
17 | }; | 17 | }; |
18 | 18 | ||
diff --git a/crates/assists/src/handlers/replace_derive_with_manual_impl.rs b/crates/assists/src/handlers/replace_derive_with_manual_impl.rs index 453a6cebf..4d6a1956b 100644 --- a/crates/assists/src/handlers/replace_derive_with_manual_impl.rs +++ b/crates/assists/src/handlers/replace_derive_with_manual_impl.rs | |||
@@ -1,3 +1,4 @@ | |||
1 | use ide_db::helpers::mod_path_to_ast; | ||
1 | use ide_db::imports_locator; | 2 | use ide_db::imports_locator; |
2 | use itertools::Itertools; | 3 | use itertools::Itertools; |
3 | use syntax::{ | 4 | use syntax::{ |
@@ -10,8 +11,7 @@ use syntax::{ | |||
10 | use crate::{ | 11 | use crate::{ |
11 | assist_context::{AssistBuilder, AssistContext, Assists}, | 12 | assist_context::{AssistBuilder, AssistContext, Assists}, |
12 | utils::{ | 13 | utils::{ |
13 | add_trait_assoc_items_to_impl, filter_assoc_items, mod_path_to_ast, render_snippet, Cursor, | 14 | add_trait_assoc_items_to_impl, filter_assoc_items, render_snippet, Cursor, DefaultMethods, |
14 | DefaultMethods, | ||
15 | }, | 15 | }, |
16 | AssistId, AssistKind, | 16 | AssistId, AssistKind, |
17 | }; | 17 | }; |
diff --git a/crates/assists/src/handlers/replace_qualified_name_with_use.rs b/crates/assists/src/handlers/replace_qualified_name_with_use.rs index a66db9ae3..8193e45a8 100644 --- a/crates/assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/assists/src/handlers/replace_qualified_name_with_use.rs | |||
@@ -1,10 +1,8 @@ | |||
1 | use ide_db::helpers::insert_use::{insert_use, ImportScope}; | ||
1 | use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SyntaxNode}; | 2 | use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SyntaxNode}; |
2 | use test_utils::mark; | 3 | use test_utils::mark; |
3 | 4 | ||
4 | use crate::{ | 5 | use crate::{AssistContext, AssistId, AssistKind, Assists}; |
5 | utils::{insert_use, ImportScope}, | ||
6 | AssistContext, AssistId, AssistKind, Assists, | ||
7 | }; | ||
8 | 6 | ||
9 | // Assist: replace_qualified_name_with_use | 7 | // Assist: replace_qualified_name_with_use |
10 | // | 8 | // |
@@ -409,7 +407,7 @@ impl std::fmt::Display<|> for Foo { | |||
409 | } | 407 | } |
410 | ", | 408 | ", |
411 | r" | 409 | r" |
412 | use std::fmt::{nested::Debug, Display}; | 410 | use std::fmt::{Display, nested::Debug}; |
413 | 411 | ||
414 | impl Display for Foo { | 412 | impl Display for Foo { |
415 | } | 413 | } |
diff --git a/crates/assists/src/handlers/ignore_test.rs b/crates/assists/src/handlers/toggle_ignore.rs index 5096a0005..14b420421 100644 --- a/crates/assists/src/handlers/ignore_test.rs +++ b/crates/assists/src/handlers/toggle_ignore.rs | |||
@@ -5,7 +5,7 @@ use syntax::{ | |||
5 | 5 | ||
6 | use crate::{utils::test_related_attribute, AssistContext, AssistId, AssistKind, Assists}; | 6 | use crate::{utils::test_related_attribute, AssistContext, AssistId, AssistKind, Assists}; |
7 | 7 | ||
8 | // Assist: ignore_test | 8 | // Assist: toggle_ignore |
9 | // | 9 | // |
10 | // Adds `#[ignore]` attribute to the test. | 10 | // Adds `#[ignore]` attribute to the test. |
11 | // | 11 | // |
@@ -23,20 +23,20 @@ use crate::{utils::test_related_attribute, AssistContext, AssistId, AssistKind, | |||
23 | // assert_eq!(2 + 2, 5); | 23 | // assert_eq!(2 + 2, 5); |
24 | // } | 24 | // } |
25 | // ``` | 25 | // ``` |
26 | pub(crate) fn ignore_test(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | 26 | pub(crate) fn toggle_ignore(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { |
27 | let attr: ast::Attr = ctx.find_node_at_offset()?; | 27 | let attr: ast::Attr = ctx.find_node_at_offset()?; |
28 | let func = attr.syntax().parent().and_then(ast::Fn::cast)?; | 28 | let func = attr.syntax().parent().and_then(ast::Fn::cast)?; |
29 | let attr = test_related_attribute(&func)?; | 29 | let attr = test_related_attribute(&func)?; |
30 | 30 | ||
31 | match has_ignore_attribute(&func) { | 31 | match has_ignore_attribute(&func) { |
32 | None => acc.add( | 32 | None => acc.add( |
33 | AssistId("ignore_test", AssistKind::None), | 33 | AssistId("toggle_ignore", AssistKind::None), |
34 | "Ignore this test", | 34 | "Ignore this test", |
35 | attr.syntax().text_range(), | 35 | attr.syntax().text_range(), |
36 | |builder| builder.insert(attr.syntax().text_range().end(), &format!("\n#[ignore]")), | 36 | |builder| builder.insert(attr.syntax().text_range().end(), &format!("\n#[ignore]")), |
37 | ), | 37 | ), |
38 | Some(ignore_attr) => acc.add( | 38 | Some(ignore_attr) => acc.add( |
39 | AssistId("unignore_test", AssistKind::None), | 39 | AssistId("toggle_ignore", AssistKind::None), |
40 | "Re-enable this test", | 40 | "Re-enable this test", |
41 | ignore_attr.syntax().text_range(), | 41 | ignore_attr.syntax().text_range(), |
42 | |builder| { | 42 | |builder| { |
@@ -55,24 +55,19 @@ pub(crate) fn ignore_test(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
55 | } | 55 | } |
56 | 56 | ||
57 | fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> { | 57 | fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> { |
58 | fn_def.attrs().find_map(|attr| { | 58 | fn_def.attrs().find(|attr| attr.path().map(|it| it.syntax().text() == "ignore") == Some(true)) |
59 | if attr.path()?.syntax().text() == "ignore" { | ||
60 | Some(attr) | ||
61 | } else { | ||
62 | None | ||
63 | } | ||
64 | }) | ||
65 | } | 59 | } |
66 | 60 | ||
67 | #[cfg(test)] | 61 | #[cfg(test)] |
68 | mod tests { | 62 | mod tests { |
69 | use super::ignore_test; | ||
70 | use crate::tests::check_assist; | 63 | use crate::tests::check_assist; |
71 | 64 | ||
65 | use super::*; | ||
66 | |||
72 | #[test] | 67 | #[test] |
73 | fn test_base_case() { | 68 | fn test_base_case() { |
74 | check_assist( | 69 | check_assist( |
75 | ignore_test, | 70 | toggle_ignore, |
76 | r#" | 71 | r#" |
77 | #[test<|>] | 72 | #[test<|>] |
78 | fn test() {} | 73 | fn test() {} |
@@ -88,7 +83,7 @@ mod tests { | |||
88 | #[test] | 83 | #[test] |
89 | fn test_unignore() { | 84 | fn test_unignore() { |
90 | check_assist( | 85 | check_assist( |
91 | ignore_test, | 86 | toggle_ignore, |
92 | r#" | 87 | r#" |
93 | #[test<|>] | 88 | #[test<|>] |
94 | #[ignore] | 89 | #[ignore] |