mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Rename Source::ast -> Source::value
This commit is contained in:
parent
e975f6364c
commit
36e3fc9d54
43 changed files with 226 additions and 214 deletions
|
@ -169,7 +169,7 @@ impl Completions {
|
|||
None => return,
|
||||
};
|
||||
|
||||
let ast_node = macro_.source(ctx.db).ast;
|
||||
let ast_node = macro_.source(ctx.db).value;
|
||||
let detail = macro_label(&ast_node);
|
||||
|
||||
let docs = macro_.docs(ctx.db);
|
||||
|
@ -201,7 +201,7 @@ impl Completions {
|
|||
) {
|
||||
let data = func.data(ctx.db);
|
||||
let name = name.unwrap_or_else(|| data.name().to_string());
|
||||
let ast_node = func.source(ctx.db).ast;
|
||||
let ast_node = func.source(ctx.db).value;
|
||||
let detail = function_label(&ast_node);
|
||||
|
||||
let mut builder =
|
||||
|
@ -234,7 +234,7 @@ impl Completions {
|
|||
}
|
||||
|
||||
pub(crate) fn add_const(&mut self, ctx: &CompletionContext, constant: hir::Const) {
|
||||
let ast_node = constant.source(ctx.db).ast;
|
||||
let ast_node = constant.source(ctx.db).value;
|
||||
let name = match ast_node.name() {
|
||||
Some(name) => name,
|
||||
_ => return,
|
||||
|
@ -250,7 +250,7 @@ impl Completions {
|
|||
}
|
||||
|
||||
pub(crate) fn add_type_alias(&mut self, ctx: &CompletionContext, type_alias: hir::TypeAlias) {
|
||||
let type_def = type_alias.source(ctx.db).ast;
|
||||
let type_def = type_alias.source(ctx.db).value;
|
||||
let name = match type_def.name() {
|
||||
Some(name) => name,
|
||||
_ => return,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue