diff options
author | Seivan Heidari <[email protected]> | 2019-11-21 00:11:41 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-21 00:11:41 +0000 |
commit | 358a1bcd708c622836723e5201b6de77cc9ff327 (patch) | |
tree | aeff9c96a6059fa2b02e7c87ec88753bc7993d8d /crates/ra_ide_api/src/completion/presentation.rs | |
parent | 1e2d090ab8a9bda18f148b894b7948eb05b976e6 (diff) | |
parent | 612a72fc4ea4376920f2a7da7b3c334227c1716c (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_ide_api/src/completion/presentation.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 501b7da4e..b20329459 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -169,7 +169,7 @@ impl Completions { | |||
169 | None => return, | 169 | None => return, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | let ast_node = macro_.source(ctx.db).ast; | 172 | let ast_node = macro_.source(ctx.db).value; |
173 | let detail = macro_label(&ast_node); | 173 | let detail = macro_label(&ast_node); |
174 | 174 | ||
175 | let docs = macro_.docs(ctx.db); | 175 | let docs = macro_.docs(ctx.db); |
@@ -201,7 +201,7 @@ impl Completions { | |||
201 | ) { | 201 | ) { |
202 | let data = func.data(ctx.db); | 202 | let data = func.data(ctx.db); |
203 | let name = name.unwrap_or_else(|| data.name().to_string()); | 203 | let name = name.unwrap_or_else(|| data.name().to_string()); |
204 | let ast_node = func.source(ctx.db).ast; | 204 | let ast_node = func.source(ctx.db).value; |
205 | let detail = function_label(&ast_node); | 205 | let detail = function_label(&ast_node); |
206 | 206 | ||
207 | let mut builder = | 207 | let mut builder = |
@@ -234,7 +234,7 @@ impl Completions { | |||
234 | } | 234 | } |
235 | 235 | ||
236 | pub(crate) fn add_const(&mut self, ctx: &CompletionContext, constant: hir::Const) { | 236 | pub(crate) fn add_const(&mut self, ctx: &CompletionContext, constant: hir::Const) { |
237 | let ast_node = constant.source(ctx.db).ast; | 237 | let ast_node = constant.source(ctx.db).value; |
238 | let name = match ast_node.name() { | 238 | let name = match ast_node.name() { |
239 | Some(name) => name, | 239 | Some(name) => name, |
240 | _ => return, | 240 | _ => return, |
@@ -250,7 +250,7 @@ impl Completions { | |||
250 | } | 250 | } |
251 | 251 | ||
252 | pub(crate) fn add_type_alias(&mut self, ctx: &CompletionContext, type_alias: hir::TypeAlias) { | 252 | pub(crate) fn add_type_alias(&mut self, ctx: &CompletionContext, type_alias: hir::TypeAlias) { |
253 | let type_def = type_alias.source(ctx.db).ast; | 253 | let type_def = type_alias.source(ctx.db).value; |
254 | let name = match type_def.name() { | 254 | let name = match type_def.name() { |
255 | Some(name) => name, | 255 | Some(name) => name, |
256 | _ => return, | 256 | _ => return, |