Skip to content

Commit 7eedf19

Browse files
committed
Move deprecated attribute to where it is needed
1 parent 9a9c0e1 commit 7eedf19

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crates/rust-analyzer/src/handlers.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
//! Protocol. The majority of requests are fulfilled by calling into the
33
//! `ra_ide` crate.
44
5-
#![allow(deprecated)]
6-
75
use std::{
86
io::Write as _,
97
process::{self, Stdio},
@@ -260,6 +258,7 @@ pub(crate) fn handle_document_symbol(
260258
tags.push(SymbolTag::Deprecated)
261259
};
262260

261+
#[allow(deprecated)]
263262
let doc_symbol = DocumentSymbol {
264263
name: symbol.label,
265264
detail: symbol.detail,
@@ -305,11 +304,14 @@ pub(crate) fn handle_document_symbol(
305304
res: &mut Vec<SymbolInformation>,
306305
) {
307306
let mut tags = Vec::new();
307+
308+
#[allow(deprecated)]
308309
match symbol.deprecated {
309310
Some(true) => tags.push(SymbolTag::Deprecated),
310311
_ => {}
311312
}
312313

314+
#[allow(deprecated)]
313315
res.push(SymbolInformation {
314316
name: symbol.name.clone(),
315317
kind: symbol.kind,
@@ -357,6 +359,8 @@ pub(crate) fn handle_workspace_symbol(
357359
let mut res = Vec::new();
358360
for nav in snap.analysis.symbol_search(query)? {
359361
let container_name = nav.container_name.as_ref().map(|v| v.to_string());
362+
363+
#[allow(deprecated)]
360364
let info = SymbolInformation {
361365
name: nav.name.to_string(),
362366
kind: to_proto::symbol_kind(nav.kind),

0 commit comments

Comments
 (0)