mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Remove some stale deprecations
This commit is contained in:
parent
1347b7fa4c
commit
c8ace3a295
5 changed files with 5 additions and 12 deletions
|
@ -156,7 +156,6 @@ fn missing_record_expr_field_fix(
|
|||
let record_fields = match VariantDef::from(def_id) {
|
||||
VariantDef::Struct(s) => {
|
||||
module = s.module(sema.db);
|
||||
#[allow(deprecated)]
|
||||
let source = s.source(sema.db)?;
|
||||
def_file_id = source.file_id;
|
||||
let fields = source.value.field_list()?;
|
||||
|
@ -164,14 +163,12 @@ fn missing_record_expr_field_fix(
|
|||
}
|
||||
VariantDef::Union(u) => {
|
||||
module = u.module(sema.db);
|
||||
#[allow(deprecated)]
|
||||
let source = u.source(sema.db)?;
|
||||
def_file_id = source.file_id;
|
||||
source.value.record_field_list()?
|
||||
}
|
||||
VariantDef::Variant(e) => {
|
||||
module = e.module(sema.db);
|
||||
#[allow(deprecated)]
|
||||
let source = e.source(sema.db)?;
|
||||
def_file_id = source.file_id;
|
||||
let fields = source.value.field_list()?;
|
||||
|
|
|
@ -320,7 +320,6 @@ fn hover_for_definition(db: &RootDatabase, def: Definition) -> Option<Markup> {
|
|||
from_def_source_labeled(db, it, Some(label), mod_path)
|
||||
}
|
||||
Definition::Field(def) => {
|
||||
#[allow(deprecated)]
|
||||
let src = def.source(db)?.value;
|
||||
if let FieldSource::Named(it) = src {
|
||||
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> {
|
|||
D: HasSource<Ast = A> + HasAttrs + Copy,
|
||||
A: ShortLabel,
|
||||
{
|
||||
#[allow(deprecated)]
|
||||
let short_label = def.source(db)?.value.short_label();
|
||||
from_def_source_labeled(db, def, short_label, mod_path)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue