aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2020-07-22 20:41:38 +0100
committerkjeremy <[email protected]>2020-07-22 20:41:38 +0100
commit7eedf19cfa334be06ae2efc6c97d7fff83ccc202 (patch)
treeaf048a1c9c32c4a9d6449b6152b5c0e4727cd56d /crates
parent9a9c0e1105a57ccb231c64e1ebd2a200b4426b64 (diff)
Move deprecated attribute to where it is needed
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/handlers.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 2589002e7..8d8c9442b 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -2,8 +2,6 @@
2//! Protocol. The majority of requests are fulfilled by calling into the 2//! Protocol. The majority of requests are fulfilled by calling into the
3//! `ra_ide` crate. 3//! `ra_ide` crate.
4 4
5#![allow(deprecated)]
6
7use std::{ 5use std::{
8 io::Write as _, 6 io::Write as _,
9 process::{self, Stdio}, 7 process::{self, Stdio},
@@ -260,6 +258,7 @@ pub(crate) fn handle_document_symbol(
260 tags.push(SymbolTag::Deprecated) 258 tags.push(SymbolTag::Deprecated)
261 }; 259 };
262 260
261 #[allow(deprecated)]
263 let doc_symbol = DocumentSymbol { 262 let doc_symbol = DocumentSymbol {
264 name: symbol.label, 263 name: symbol.label,
265 detail: symbol.detail, 264 detail: symbol.detail,
@@ -305,11 +304,14 @@ pub(crate) fn handle_document_symbol(
305 res: &mut Vec<SymbolInformation>, 304 res: &mut Vec<SymbolInformation>,
306 ) { 305 ) {
307 let mut tags = Vec::new(); 306 let mut tags = Vec::new();
307
308 #[allow(deprecated)]
308 match symbol.deprecated { 309 match symbol.deprecated {
309 Some(true) => tags.push(SymbolTag::Deprecated), 310 Some(true) => tags.push(SymbolTag::Deprecated),
310 _ => {} 311 _ => {}
311 } 312 }
312 313
314 #[allow(deprecated)]
313 res.push(SymbolInformation { 315 res.push(SymbolInformation {
314 name: symbol.name.clone(), 316 name: symbol.name.clone(),
315 kind: symbol.kind, 317 kind: symbol.kind,
@@ -357,6 +359,8 @@ pub(crate) fn handle_workspace_symbol(
357 let mut res = Vec::new(); 359 let mut res = Vec::new();
358 for nav in snap.analysis.symbol_search(query)? { 360 for nav in snap.analysis.symbol_search(query)? {
359 let container_name = nav.container_name.as_ref().map(|v| v.to_string()); 361 let container_name = nav.container_name.as_ref().map(|v| v.to_string());
362
363 #[allow(deprecated)]
360 let info = SymbolInformation { 364 let info = SymbolInformation {
361 name: nav.name.to_string(), 365 name: nav.name.to_string(),
362 kind: to_proto::symbol_kind(nav.kind), 366 kind: to_proto::symbol_kind(nav.kind),