mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
remove useless aliases
This commit is contained in:
parent
a7c0336a75
commit
11dda8a0fb
3 changed files with 14 additions and 38 deletions
|
@ -9,7 +9,7 @@ use crate::{
|
|||
type_ref::{TypeRef, Mutability},
|
||||
expr::Body,
|
||||
impl_block::ImplBlock,
|
||||
ids::FunctionLoc,
|
||||
ids::ItemLoc,
|
||||
};
|
||||
|
||||
pub use self::scope::{FnScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax};
|
||||
|
@ -21,8 +21,8 @@ impl Function {
|
|||
file_id: HirFileId,
|
||||
ast: &ast::FnDef,
|
||||
) -> Function {
|
||||
let loc: FunctionLoc = FunctionLoc::from_ast(db, module, file_id, ast);
|
||||
let id = loc.id(db);
|
||||
let loc = ItemLoc::from_ast(db, module, file_id, ast);
|
||||
let id = db.as_ref().fns.loc2id(&loc);
|
||||
Function { id }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue