diff options
Diffstat (limited to 'crates/assists/src/handlers')
-rw-r--r-- | crates/assists/src/handlers/fill_match_arms.rs | 1 | ||||
-rw-r--r-- | crates/assists/src/handlers/fix_visibility.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index a8efad6d6..d17c82e18 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs | |||
@@ -196,6 +196,7 @@ fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::Variant) -> Optio | |||
196 | let path = mod_path_to_ast(&module.find_use_path(db, ModuleDef::from(var))?); | 196 | let path = mod_path_to_ast(&module.find_use_path(db, ModuleDef::from(var))?); |
197 | 197 | ||
198 | // FIXME: use HIR for this; it doesn't currently expose struct vs. tuple vs. unit variants though | 198 | // FIXME: use HIR for this; it doesn't currently expose struct vs. tuple vs. unit variants though |
199 | #[allow(deprecated)] | ||
199 | let pat: ast::Pat = match var.source_old(db).value.kind() { | 200 | let pat: ast::Pat = match var.source_old(db).value.kind() { |
200 | ast::StructKind::Tuple(field_list) => { | 201 | ast::StructKind::Tuple(field_list) => { |
201 | let pats = iter::repeat(make::wildcard_pat().into()).take(field_list.fields().count()); | 202 | let pats = iter::repeat(make::wildcard_pat().into()).take(field_list.fields().count()); |
diff --git a/crates/assists/src/handlers/fix_visibility.rs b/crates/assists/src/handlers/fix_visibility.rs index d8150abd9..7d440d420 100644 --- a/crates/assists/src/handlers/fix_visibility.rs +++ b/crates/assists/src/handlers/fix_visibility.rs | |||
@@ -97,6 +97,7 @@ fn add_vis_to_referenced_record_field(acc: &mut Assists, ctx: &AssistContext) -> | |||
97 | let parent_name = parent.name(ctx.db()); | 97 | let parent_name = parent.name(ctx.db()); |
98 | let target_module = parent.module(ctx.db()); | 98 | let target_module = parent.module(ctx.db()); |
99 | 99 | ||
100 | #[allow(deprecated)] | ||
100 | let in_file_source = record_field_def.source_old(ctx.db()); | 101 | let in_file_source = record_field_def.source_old(ctx.db()); |
101 | let (offset, current_visibility, target) = match in_file_source.value { | 102 | let (offset, current_visibility, target) = match in_file_source.value { |
102 | hir::FieldSource::Named(it) => { | 103 | hir::FieldSource::Named(it) => { |
@@ -150,6 +151,7 @@ fn target_data_for_def( | |||
150 | S: HasSource<Ast = Ast>, | 151 | S: HasSource<Ast = Ast>, |
151 | Ast: AstNode + ast::VisibilityOwner, | 152 | Ast: AstNode + ast::VisibilityOwner, |
152 | { | 153 | { |
154 | #[allow(deprecated)] | ||
153 | let source = x.source_old(db); | 155 | let source = x.source_old(db); |
154 | let in_file_syntax = source.syntax(); | 156 | let in_file_syntax = source.syntax(); |
155 | let file_id = in_file_syntax.file_id; | 157 | let file_id = in_file_syntax.file_id; |