aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorZac Pullar-Strecker <[email protected]>2020-06-16 05:52:40 +0100
committerZac Pullar-Strecker <[email protected]>2020-06-30 09:10:24 +0100
commit10c50b140aa67f74a135e7a48ff6d954cc757cb8 (patch)
tree2dddde4014e887ef57a4be68f8c00a2816c22ac7 /crates/ra_hir
parentf9893d370c4c3b015698169d27d2833742441560 (diff)
Format & replace todos with 'fixme'
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs22
1 files changed, 13 insertions, 9 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 5766cc3b8..839eb475e 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -192,11 +192,11 @@ impl ModuleDef {
192 ModuleDef::Function(m) => Some(m.name(db)), 192 ModuleDef::Function(m) => Some(m.name(db)),
193 ModuleDef::Adt(m) => Some(m.name(db)), 193 ModuleDef::Adt(m) => Some(m.name(db)),
194 ModuleDef::EnumVariant(m) => Some(m.name(db)), 194 ModuleDef::EnumVariant(m) => Some(m.name(db)),
195 ModuleDef::Const(m) => {m.name(db)}, 195 ModuleDef::Const(m) => m.name(db),
196 ModuleDef::Static(m) => {m.name(db)}, 196 ModuleDef::Static(m) => m.name(db),
197 ModuleDef::Trait(m) => {Some(m.name(db))}, 197 ModuleDef::Trait(m) => Some(m.name(db)),
198 ModuleDef::TypeAlias(m) => {Some(m.name(db))}, 198 ModuleDef::TypeAlias(m) => Some(m.name(db)),
199 ModuleDef::BuiltinType(m) => {Some(m.as_name())} 199 ModuleDef::BuiltinType(m) => Some(m.as_name()),
200 } 200 }
201 } 201 }
202 202
@@ -205,13 +205,17 @@ impl ModuleDef {
205 ModuleDef::Module(m) => Into::<ModuleId>::into(m.clone()).resolver(db), 205 ModuleDef::Module(m) => Into::<ModuleId>::into(m.clone()).resolver(db),
206 ModuleDef::Function(f) => Into::<FunctionId>::into(f.clone()).resolver(db), 206 ModuleDef::Function(f) => Into::<FunctionId>::into(f.clone()).resolver(db),
207 ModuleDef::Adt(adt) => Into::<AdtId>::into(adt.clone()).resolver(db), 207 ModuleDef::Adt(adt) => Into::<AdtId>::into(adt.clone()).resolver(db),
208 ModuleDef::EnumVariant(ev) => Into::<GenericDefId>::into(Into::<GenericDef>::into(ev.clone())).resolver(db), 208 ModuleDef::EnumVariant(ev) => {
209 ModuleDef::Const(c) => Into::<GenericDefId>::into(Into::<GenericDef>::into(c.clone())).resolver(db), 209 Into::<GenericDefId>::into(Into::<GenericDef>::into(ev.clone())).resolver(db)
210 }
211 ModuleDef::Const(c) => {
212 Into::<GenericDefId>::into(Into::<GenericDef>::into(c.clone())).resolver(db)
213 }
210 ModuleDef::Static(s) => Into::<StaticId>::into(s.clone()).resolver(db), 214 ModuleDef::Static(s) => Into::<StaticId>::into(s.clone()).resolver(db),
211 ModuleDef::Trait(t) => Into::<TraitId>::into(t.clone()).resolver(db), 215 ModuleDef::Trait(t) => Into::<TraitId>::into(t.clone()).resolver(db),
212 ModuleDef::TypeAlias(t) => Into::<ModuleId>::into(t.module(db)).resolver(db), 216 ModuleDef::TypeAlias(t) => Into::<ModuleId>::into(t.module(db)).resolver(db),
213 // TODO: This should be a resolver relative to `std` 217 // FIXME: This should be a resolver relative to `std/core`
214 ModuleDef::BuiltinType(_t) => None? 218 ModuleDef::BuiltinType(_t) => None?,
215 }) 219 })
216 } 220 }
217} 221}