mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
rename syntax-mapping -> source-map
This commit is contained in:
parent
592b906604
commit
eaf1df26e9
11 changed files with 32 additions and 32 deletions
|
@ -132,7 +132,7 @@ pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option<String> {
|
|||
let parent_fn = node.ancestors().find_map(ast::FnDef::cast)?;
|
||||
let function = hir::source_binder::function_from_source(db, frange.file_id, parent_fn)?;
|
||||
let infer = function.infer(db);
|
||||
let syntax_mapping = function.body_syntax_mapping(db);
|
||||
let syntax_mapping = function.body_source_map(db);
|
||||
if let Some(expr) = ast::Expr::cast(node).and_then(|e| syntax_mapping.node_expr(e)) {
|
||||
Some(infer[expr].to_string())
|
||||
} else if let Some(pat) = ast::Pat::cast(node).and_then(|p| syntax_mapping.node_pat(p)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue