aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-07 10:54:44 +0000
committerGitHub <[email protected]>2021-01-07 10:54:44 +0000
commit171c3c08fe245938fb25321394233de5fe2abc7c (patch)
treecb6ca14556d79df1caa088011d5389ac8b80db28 /crates/ide/src
parent1347b7fa4cdc2064ac1cb4a686f10890b9235893 (diff)
parentc8ace3a295aa63ff7f210f11840e7fc9de65264c (diff)
Merge #7190
7190: Remove some stale deprecations r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/diagnostics/fixes.rs3
-rw-r--r--crates/ide/src/hover.rs2
2 files changed, 0 insertions, 5 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs
index ec0f840e9..71ec4df92 100644
--- a/crates/ide/src/diagnostics/fixes.rs
+++ b/crates/ide/src/diagnostics/fixes.rs
@@ -156,7 +156,6 @@ fn missing_record_expr_field_fix(
156 let record_fields = match VariantDef::from(def_id) { 156 let record_fields = match VariantDef::from(def_id) {
157 VariantDef::Struct(s) => { 157 VariantDef::Struct(s) => {
158 module = s.module(sema.db); 158 module = s.module(sema.db);
159 #[allow(deprecated)]
160 let source = s.source(sema.db)?; 159 let source = s.source(sema.db)?;
161 def_file_id = source.file_id; 160 def_file_id = source.file_id;
162 let fields = source.value.field_list()?; 161 let fields = source.value.field_list()?;
@@ -164,14 +163,12 @@ fn missing_record_expr_field_fix(
164 } 163 }
165 VariantDef::Union(u) => { 164 VariantDef::Union(u) => {
166 module = u.module(sema.db); 165 module = u.module(sema.db);
167 #[allow(deprecated)]
168 let source = u.source(sema.db)?; 166 let source = u.source(sema.db)?;
169 def_file_id = source.file_id; 167 def_file_id = source.file_id;
170 source.value.record_field_list()? 168 source.value.record_field_list()?
171 } 169 }
172 VariantDef::Variant(e) => { 170 VariantDef::Variant(e) => {
173 module = e.module(sema.db); 171 module = e.module(sema.db);
174 #[allow(deprecated)]
175 let source = e.source(sema.db)?; 172 let source = e.source(sema.db)?;
176 def_file_id = source.file_id; 173 def_file_id = source.file_id;
177 let fields = source.value.field_list()?; 174 let fields = source.value.field_list()?;
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 72c9c66fe..a12a2475e 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -320,7 +320,6 @@ fn hover_for_definition(db: &RootDatabase, def: Definition) -> Option<Markup> {
320 from_def_source_labeled(db, it, Some(label), mod_path) 320 from_def_source_labeled(db, it, Some(label), mod_path)
321 } 321 }
322 Definition::Field(def) => { 322 Definition::Field(def) => {
323 #[allow(deprecated)]
324 let src = def.source(db)?.value; 323 let src = def.source(db)?.value;
325 if let FieldSource::Named(it) = src { 324 if let FieldSource::Named(it) = src {
326 from_def_source_labeled(db, def, it.short_label(), mod_path) 325 from_def_source_labeled(db, def, it.short_label(), mod_path)
@@ -368,7 +367,6 @@ fn hover_for_definition(db: &RootDatabase, def: Definition) -> Option<Markup> {
368 D: HasSource<Ast = A> + HasAttrs + Copy, 367 D: HasSource<Ast = A> + HasAttrs + Copy,
369 A: ShortLabel, 368 A: ShortLabel,
370 { 369 {
371 #[allow(deprecated)]
372 let short_label = def.source(db)?.value.short_label(); 370 let short_label = def.source(db)?.value.short_label();
373 from_def_source_labeled(db, def, short_label, mod_path) 371 from_def_source_labeled(db, def, short_label, mod_path)
374 } 372 }