Skip to content

Commit 26086fa

Browse files
committed
Change Option::Some bug to a fixme note
IMO this is too much work to be worth fixing at the moment.
1 parent c648884 commit 26086fa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/hir/src/code_model.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ impl Function {
779779
db.function_data(self.id).has_body
780780
}
781781

782+
/// If this function is a method, the trait or type where it is declared.
782783
pub fn method_owner(self, db: &dyn HirDatabase) -> Option<MethodOwner> {
783784
match self.as_assoc_item(db).map(|assoc| assoc.container(db)) {
784785
Some(AssocItemContainer::Trait(t)) => Some(t.into()),

crates/ide/src/doc_links.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ pub fn get_doc_link<T: Resolvable + Clone>(db: &dyn HirDatabase, definition: &T)
103103
get_doc_link_impl(db, &module_def)
104104
}
105105

106-
// TODO:
107-
// BUG: For Option
106+
// FIXME:
107+
// BUG: For Option::Some
108108
// Returns https://doc.rust-lang.org/nightly/core/prelude/v1/enum.Option.html#variant.Some
109109
// Instead of https://doc.rust-lang.org/nightly/core/option/enum.Option.html
110110
// This could be worked around by turning the `EnumVariant` into `Enum` before attempting resolution,
@@ -405,7 +405,7 @@ fn get_symbol_fragment(db: &dyn HirDatabase, field_or_assoc: &FieldOrAssocItem)
405405
let is_trait_method =
406406
matches!(function.method_owner(db), Some(MethodOwner::Trait(..)));
407407
// This distinction may get more complicated when specialisation is available.
408-
// In particular this decision is made based on whether a method 'has defaultness'.
408+
// Rustdoc makes this decision based on whether a method 'has defaultness'.
409409
// Currently this is only the case for provided trait methods.
410410
if is_trait_method && !function.has_body(db) {
411411
format!("#tymethod.{}", function.name(db))

0 commit comments

Comments
 (0)