Skip to content

Commit c8ace3a

Browse files
committed
Remove some stale deprecations
1 parent 1347b7f commit c8ace3a

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

crates/assists/src/handlers/fix_visibility.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ fn add_vis_to_referenced_record_field(acc: &mut Assists, ctx: &AssistContext) ->
9797
let parent_name = parent.name(ctx.db());
9898
let target_module = parent.module(ctx.db());
9999

100-
#[allow(deprecated)]
101100
let in_file_source = record_field_def.source(ctx.db())?;
102101
let (offset, current_visibility, target) = match in_file_source.value {
103102
hir::FieldSource::Named(it) => {

crates/ide/src/diagnostics/fixes.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,19 @@ fn missing_record_expr_field_fix(
156156
let record_fields = match VariantDef::from(def_id) {
157157
VariantDef::Struct(s) => {
158158
module = s.module(sema.db);
159-
#[allow(deprecated)]
160159
let source = s.source(sema.db)?;
161160
def_file_id = source.file_id;
162161
let fields = source.value.field_list()?;
163162
record_field_list(fields)?
164163
}
165164
VariantDef::Union(u) => {
166165
module = u.module(sema.db);
167-
#[allow(deprecated)]
168166
let source = u.source(sema.db)?;
169167
def_file_id = source.file_id;
170168
source.value.record_field_list()?
171169
}
172170
VariantDef::Variant(e) => {
173171
module = e.module(sema.db);
174-
#[allow(deprecated)]
175172
let source = e.source(sema.db)?;
176173
def_file_id = source.file_id;
177174
let fields = source.value.field_list()?;

crates/ide/src/hover.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ fn hover_for_definition(db: &RootDatabase, def: Definition) -> Option<Markup> {
320320
from_def_source_labeled(db, it, Some(label), mod_path)
321321
}
322322
Definition::Field(def) => {
323-
#[allow(deprecated)]
324323
let src = def.source(db)?.value;
325324
if let FieldSource::Named(it) = src {
326325
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> {
368367
D: HasSource<Ast = A> + HasAttrs + Copy,
369368
A: ShortLabel,
370369
{
371-
#[allow(deprecated)]
372370
let short_label = def.source(db)?.value.short_label();
373371
from_def_source_labeled(db, def, short_label, mod_path)
374372
}

crates/ide_db/src/search.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ impl Definition {
137137
}
138138

139139
if let Definition::LifetimeParam(param) = self {
140-
#[allow(deprecated)]
141140
let range = match param.parent(db) {
142141
hir::GenericDef::Function(it) => {
143142
it.source(db).and_then(|src| Some(src.value.syntax().text_range()))

crates/rust-analyzer/src/handlers.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use lsp_types::{
1818
CallHierarchyIncomingCall, CallHierarchyIncomingCallsParams, CallHierarchyItem,
1919
CallHierarchyOutgoingCall, CallHierarchyOutgoingCallsParams, CallHierarchyPrepareParams,
2020
CodeActionKind, CodeLens, Command, CompletionItem, Diagnostic, DiagnosticTag,
21-
DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeParams,
22-
HoverContents, Location, NumberOrString, Position, PrepareRenameResponse, Range, RenameParams,
21+
DocumentFormattingParams, DocumentHighlight, FoldingRange, FoldingRangeParams, HoverContents,
22+
Location, NumberOrString, Position, PrepareRenameResponse, Range, RenameParams,
2323
SemanticTokensDeltaParams, SemanticTokensFullDeltaResult, SemanticTokensParams,
2424
SemanticTokensRangeParams, SemanticTokensRangeResult, SemanticTokensResult, SymbolInformation,
2525
SymbolTag, TextDocumentIdentifier, TextDocumentPositionParams, Url, WorkspaceEdit,
@@ -280,7 +280,7 @@ pub(crate) fn handle_document_symbol(
280280
let file_id = from_proto::file_id(&snap, &params.text_document.uri)?;
281281
let line_index = snap.analysis.file_line_index(file_id)?;
282282

283-
let mut parents: Vec<(DocumentSymbol, Option<usize>)> = Vec::new();
283+
let mut parents: Vec<(lsp_types::DocumentSymbol, Option<usize>)> = Vec::new();
284284

285285
for symbol in snap.analysis.file_structure(file_id)? {
286286
let mut tags = Vec::new();
@@ -289,7 +289,7 @@ pub(crate) fn handle_document_symbol(
289289
};
290290

291291
#[allow(deprecated)]
292-
let doc_symbol = DocumentSymbol {
292+
let doc_symbol = lsp_types::DocumentSymbol {
293293
name: symbol.label,
294294
detail: symbol.detail,
295295
kind: to_proto::symbol_kind(symbol.kind),
@@ -333,7 +333,7 @@ pub(crate) fn handle_document_symbol(
333333
return Ok(Some(res));
334334

335335
fn flatten_document_symbol(
336-
symbol: &DocumentSymbol,
336+
symbol: &lsp_types::DocumentSymbol,
337337
container_name: Option<String>,
338338
url: &Url,
339339
res: &mut Vec<SymbolInformation>,

0 commit comments

Comments
 (0)