Merge #7190
7190: Remove some stale deprecations r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
171c3c08fe
@ -97,7 +97,6 @@ fn add_vis_to_referenced_record_field(acc: &mut Assists, ctx: &AssistContext) ->
|
||||
let parent_name = parent.name(ctx.db());
|
||||
let target_module = parent.module(ctx.db());
|
||||
|
||||
#[allow(deprecated)]
|
||||
let in_file_source = record_field_def.source(ctx.db())?;
|
||||
let (offset, current_visibility, target) = match in_file_source.value {
|
||||
hir::FieldSource::Named(it) => {
|
||||
|
@ -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 from_def_source<A, D>(db: &RootDatabase, def: D, mod_path: Option<String>) ->
|
||||
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)
|
||||
}
|
||||
|
@ -137,7 +137,6 @@ fn search_scope(&self, db: &RootDatabase) -> SearchScope {
|
||||
}
|
||||
|
||||
if let Definition::LifetimeParam(param) = self {
|
||||
#[allow(deprecated)]
|
||||
let range = match param.parent(db) {
|
||||
hir::GenericDef::Function(it) => {
|
||||
it.source(db).and_then(|src| Some(src.value.syntax().text_range()))
|
||||
|
@ -18,8 +18,8 @@
|
||||
CallHierarchyIncomingCall, CallHierarchyIncomingCallsParams, CallHierarchyItem,
|
||||
CallHierarchyOutgoingCall, CallHierarchyOutgoingCallsParams, CallHierarchyPrepareParams,
|
||||
CodeActionKind, CodeLens, Command, CompletionItem, Diagnostic, DiagnosticTag,
|
||||
DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeParams,
|
||||
HoverContents, Location, NumberOrString, Position, PrepareRenameResponse, Range, RenameParams,
|
||||
DocumentFormattingParams, DocumentHighlight, FoldingRange, FoldingRangeParams, HoverContents,
|
||||
Location, NumberOrString, Position, PrepareRenameResponse, Range, RenameParams,
|
||||
SemanticTokensDeltaParams, SemanticTokensFullDeltaResult, SemanticTokensParams,
|
||||
SemanticTokensRangeParams, SemanticTokensRangeResult, SemanticTokensResult, SymbolInformation,
|
||||
SymbolTag, TextDocumentIdentifier, TextDocumentPositionParams, Url, WorkspaceEdit,
|
||||
@ -280,7 +280,7 @@ pub(crate) fn handle_document_symbol(
|
||||
let file_id = from_proto::file_id(&snap, ¶ms.text_document.uri)?;
|
||||
let line_index = snap.analysis.file_line_index(file_id)?;
|
||||
|
||||
let mut parents: Vec<(DocumentSymbol, Option<usize>)> = Vec::new();
|
||||
let mut parents: Vec<(lsp_types::DocumentSymbol, Option<usize>)> = Vec::new();
|
||||
|
||||
for symbol in snap.analysis.file_structure(file_id)? {
|
||||
let mut tags = Vec::new();
|
||||
@ -289,7 +289,7 @@ pub(crate) fn handle_document_symbol(
|
||||
};
|
||||
|
||||
#[allow(deprecated)]
|
||||
let doc_symbol = DocumentSymbol {
|
||||
let doc_symbol = lsp_types::DocumentSymbol {
|
||||
name: symbol.label,
|
||||
detail: symbol.detail,
|
||||
kind: to_proto::symbol_kind(symbol.kind),
|
||||
@ -333,7 +333,7 @@ pub(crate) fn handle_document_symbol(
|
||||
return Ok(Some(res));
|
||||
|
||||
fn flatten_document_symbol(
|
||||
symbol: &DocumentSymbol,
|
||||
symbol: &lsp_types::DocumentSymbol,
|
||||
container_name: Option<String>,
|
||||
url: &Url,
|
||||
res: &mut Vec<SymbolInformation>,
|
||||
|
Loading…
Reference in New Issue
Block a user