hir: resolve associated items in docs (excl. type aliases)

This commit is contained in:
Grégoire Geis 2023-11-19 17:23:08 +09:00
parent d987137b4e
commit fe6f931ac2
3 changed files with 102 additions and 12 deletions

View file

@ -462,14 +462,15 @@ mod module {}
fn doc_links_inherent_impl_items() {
check_doc_links(
r#"
// /// [`Struct::CONST`]
// /// [`Struct::function`]
/// FIXME #9694
/// [`Struct::CONST`]
/// [`Struct::function`]
struct Struct$0;
impl Struct {
const CONST: () = ();
// ^^^^^ Struct::CONST
fn function() {}
// ^^^^^^^^ Struct::function
}
"#,
)
@ -482,12 +483,13 @@ fn doc_links_trait_impl_items() {
trait Trait {
type Type;
const CONST: usize;
// ^^^^^ Struct::CONST
fn function();
// ^^^^^^^^ Struct::function
}
// /// [`Struct::Type`]
// /// [`Struct::CONST`]
// /// [`Struct::function`]
/// FIXME #9694
// FIXME #9694: [`Struct::Type`]
/// [`Struct::CONST`]
/// [`Struct::function`]
struct Struct$0;
impl Trait for Struct {