mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-18 03:13:31 +00:00
Remove all upcasts!
It turns out there were a lot redundant too.
This commit is contained in:
parent
a775d21112
commit
8a9a1e3345
80 changed files with 1009 additions and 1257 deletions
|
|
@ -11,7 +11,7 @@ use hir::{
|
|||
};
|
||||
use ide_db::{
|
||||
RootDatabase, SymbolKind,
|
||||
base_db::{AnchoredPath, RootQueryDb, SourceDatabase, Upcast},
|
||||
base_db::{AnchoredPath, SourceDatabase},
|
||||
defs::{Definition, IdentClass},
|
||||
famous_defs::FamousDefs,
|
||||
helpers::pick_best_token,
|
||||
|
|
@ -222,8 +222,7 @@ fn try_lookup_include_path(
|
|||
}
|
||||
let path = token.value.value().ok()?;
|
||||
|
||||
let file_id = Upcast::<dyn RootQueryDb>::upcast(sema.db)
|
||||
.resolve_path(AnchoredPath { anchor: file_id, path: &path })?;
|
||||
let file_id = sema.db.resolve_path(AnchoredPath { anchor: file_id, path: &path })?;
|
||||
let size = sema.db.file_text(file_id).text(sema.db).len().try_into().ok()?;
|
||||
Some(NavigationTarget {
|
||||
file_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue