mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
move function to code_model_api
This commit is contained in:
parent
3b166aee3c
commit
ac92973a6c
9 changed files with 153 additions and 144 deletions
|
@ -758,10 +758,7 @@ pub(crate) fn body_syntax_mapping(
|
|||
let def = def_id.resolve(db)?;
|
||||
|
||||
let body_syntax_mapping = match def {
|
||||
Def::Function(f) => {
|
||||
let node = f.syntax(db);
|
||||
collect_fn_body_syntax(&node)
|
||||
}
|
||||
Def::Function(f) => collect_fn_body_syntax(&f.source(db)),
|
||||
// TODO: consts, etc.
|
||||
_ => panic!("Trying to get body for item type without body"),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue