aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs2
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs2
-rw-r--r--crates/ra_ide_api/src/navigation_target.rs6
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index 37985b398..bf6d91a09 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide_api/src/completion/complete_dot.rs
@@ -29,7 +29,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
29 Ty::Adt { def_id, .. } => { 29 Ty::Adt { def_id, .. } => {
30 match def_id.resolve(ctx.db)? { 30 match def_id.resolve(ctx.db)? {
31 Def::Struct(s) => { 31 Def::Struct(s) => {
32 for field in s.fields(ctx.db)? { 32 for field in s.fields(ctx.db) {
33 CompletionItem::new( 33 CompletionItem::new(
34 CompletionKind::Reference, 34 CompletionKind::Reference,
35 field.name().to_string(), 35 field.name().to_string(),
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index a25ad3f13..6388197be 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -22,7 +22,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> C
22 } 22 }
23 } 23 }
24 hir::Def::Enum(e) => { 24 hir::Def::Enum(e) => {
25 e.variants(ctx.db)? 25 e.variants(ctx.db)
26 .into_iter() 26 .into_iter()
27 .for_each(|(variant_name, _variant)| { 27 .for_each(|(variant_name, _variant)| {
28 CompletionItem::new(CompletionKind::Reference, variant_name.to_string()) 28 CompletionItem::new(CompletionKind::Reference, variant_name.to_string())
diff --git a/crates/ra_ide_api/src/navigation_target.rs b/crates/ra_ide_api/src/navigation_target.rs
index 7562b9a1f..306dbfd92 100644
--- a/crates/ra_ide_api/src/navigation_target.rs
+++ b/crates/ra_ide_api/src/navigation_target.rs
@@ -112,15 +112,15 @@ impl NavigationTarget {
112 pub(crate) fn from_def(db: &RootDatabase, def: Def) -> Cancelable<Option<NavigationTarget>> { 112 pub(crate) fn from_def(db: &RootDatabase, def: Def) -> Cancelable<Option<NavigationTarget>> {
113 let res = match def { 113 let res = match def {
114 Def::Struct(s) => { 114 Def::Struct(s) => {
115 let (file_id, node) = s.source(db)?; 115 let (file_id, node) = s.source(db);
116 NavigationTarget::from_named(file_id.original_file(db), &*node) 116 NavigationTarget::from_named(file_id.original_file(db), &*node)
117 } 117 }
118 Def::Enum(e) => { 118 Def::Enum(e) => {
119 let (file_id, node) = e.source(db)?; 119 let (file_id, node) = e.source(db);
120 NavigationTarget::from_named(file_id.original_file(db), &*node) 120 NavigationTarget::from_named(file_id.original_file(db), &*node)
121 } 121 }
122 Def::EnumVariant(ev) => { 122 Def::EnumVariant(ev) => {
123 let (file_id, node) = ev.source(db)?; 123 let (file_id, node) = ev.source(db);
124 NavigationTarget::from_named(file_id.original_file(db), &*node) 124 NavigationTarget::from_named(file_id.original_file(db), &*node)
125 } 125 }
126 Def::Function(f) => { 126 Def::Function(f) => {