aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
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_ide
parentf9893d370c4c3b015698169d27d2833742441560 (diff)
Format & replace todos with 'fixme'
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/hover.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 9f8ab4795..185139250 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -540,14 +540,14 @@ fn try_resolve_intra(
540 540
541 let resolved = resolver.resolve_module_path_in_items(db, &modpath); 541 let resolved = resolver.resolve_module_path_in_items(db, &modpath);
542 let (defid, namespace) = match namespace { 542 let (defid, namespace) = match namespace {
543 // TODO: .or(resolved.macros) 543 // FIXME: .or(resolved.macros)
544 None => resolved 544 None => resolved
545 .types 545 .types
546 .map(|t| (t.0, Namespace::Types)) 546 .map(|t| (t.0, Namespace::Types))
547 .or(resolved.values.map(|t| (t.0, Namespace::Values)))?, 547 .or(resolved.values.map(|t| (t.0, Namespace::Values)))?,
548 Some(ns @ Namespace::Types) => (resolved.types?.0, ns), 548 Some(ns @ Namespace::Types) => (resolved.types?.0, ns),
549 Some(ns @ Namespace::Values) => (resolved.values?.0, ns), 549 Some(ns @ Namespace::Values) => (resolved.values?.0, ns),
550 // TODO: 550 // FIXME:
551 Some(Namespace::Macros) => None?, 551 Some(Namespace::Macros) => None?,
552 }; 552 };
553 553
@@ -558,7 +558,7 @@ fn try_resolve_intra(
558 let ns = match namespace { 558 let ns = match namespace {
559 Namespace::Types => ItemInNs::Types(defid), 559 Namespace::Types => ItemInNs::Types(defid),
560 Namespace::Values => ItemInNs::Values(defid), 560 Namespace::Values => ItemInNs::Values(defid),
561 // TODO: 561 // FIXME:
562 Namespace::Macros => None?, 562 Namespace::Macros => None?,
563 }; 563 };
564 let import_map = db.import_map(krate.into()); 564 let import_map = db.import_map(krate.into());
@@ -603,7 +603,7 @@ fn try_resolve_path(db: &RootDatabase, definition: &Definition, link: &str) -> O
603} 603}
604 604
605/// Try to get the root URL of the documentation of a crate. 605/// Try to get the root URL of the documentation of a crate.
606// TODO: Special case standard, core, alloc libraries 606// FIXME: Special case standard, core, alloc libraries
607fn get_doc_url(db: &RootDatabase, krate: &Crate) -> Option<Url> { 607fn get_doc_url(db: &RootDatabase, krate: &Crate) -> Option<Url> {
608 // Look for #![doc(html_root_url = "...")] 608 // Look for #![doc(html_root_url = "...")]
609 let attrs = db.attrs(AttrDef::from(krate.root_module(db)?).into()); 609 let attrs = db.attrs(AttrDef::from(krate.root_module(db)?).into());
@@ -621,7 +621,7 @@ fn get_doc_url(db: &RootDatabase, krate: &Crate) -> Option<Url> {
621 }).next() 621 }).next()
622 } else { 622 } else {
623 // Fallback to docs.rs 623 // Fallback to docs.rs
624 // TODO: Specify an exact version here (from Cargo.lock) 624 // FIXME: Specify an exact version here (from Cargo.lock)
625 Some(format!("https://docs.rs/{}/*", krate.display_name(db)?)) 625 Some(format!("https://docs.rs/{}/*", krate.display_name(db)?))
626 }; 626 };
627 627
@@ -648,7 +648,6 @@ fn get_symbol_filename(db: &RootDatabase, definition: &Definition) -> Option<Str
648 format!("enum.{}.html#variant.{}", ev.parent_enum(db).name(db), ev.name(db)) 648 format!("enum.{}.html#variant.{}", ev.parent_enum(db).name(db), ev.name(db))
649 } 649 }
650 ModuleDef::Const(c) => format!("const.{}.html", c.name(db)?), 650 ModuleDef::Const(c) => format!("const.{}.html", c.name(db)?),
651 // TODO: Check this is the right prefix
652 ModuleDef::Static(s) => format!("static.{}.html", s.name(db)?), 651 ModuleDef::Static(s) => format!("static.{}.html", s.name(db)?),
653 }, 652 },
654 Definition::Macro(m) => format!("macro.{}.html", m.name(db)?), 653 Definition::Macro(m) => format!("macro.{}.html", m.name(db)?),