Skip to content

Commit

Permalink
remove hack_recover_crate_name
Browse files Browse the repository at this point in the history
  • Loading branch information
duncan committed Jan 22, 2025
1 parent b112760 commit d1acee6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 34 deletions.
25 changes: 0 additions & 25 deletions crates/rust-analyzer/src/hack_recover_crate_name.rs

This file was deleted.

5 changes: 1 addition & 4 deletions crates/rust-analyzer/src/handlers/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use crate::{
config::{Config, RustfmtConfig, WorkspaceSymbolConfig},
diagnostics::convert_diagnostic,
global_state::{FetchWorkspaceRequest, GlobalState, GlobalStateSnapshot},
hack_recover_crate_name,
line_index::LineEndings,
lsp::{
ext::{
Expand Down Expand Up @@ -299,9 +298,7 @@ pub(crate) fn handle_discover_test(
}
None => (snap.analysis.discover_test_roots()?, None),
};
for t in &tests {
hack_recover_crate_name::insert_name(t.id.clone());
}

Ok(lsp_ext::DiscoverTestResults {
tests: tests
.into_iter()
Expand Down
1 change: 0 additions & 1 deletion crates/rust-analyzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ mod command;
mod diagnostics;
mod discover;
mod flycheck;
mod hack_recover_crate_name;
mod line_index;
mod main_loop;
mod mem_docs;
Expand Down
5 changes: 1 addition & 4 deletions crates/rust-analyzer/src/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use crate::{
file_id_to_url, url_to_file_id, FetchBuildDataResponse, FetchWorkspaceRequest,
FetchWorkspaceResponse, GlobalState,
},
hack_recover_crate_name,
handlers::dispatch::{NotificationDispatcher, RequestDispatcher},
lsp::{
from_proto, to_proto,
Expand Down Expand Up @@ -634,9 +633,7 @@ impl GlobalState {
.filter_map(|f| snapshot.analysis.discover_tests_in_file(f).ok())
.flatten()
.collect::<Vec<_>>();
for t in &tests {
hack_recover_crate_name::insert_name(t.id.clone());
}

Task::DiscoverTest(lsp_ext::DiscoverTestResults {
tests: tests
.into_iter()
Expand Down

0 comments on commit d1acee6

Please sign in to comment.