mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
hir: resolve associated items in docs (excl. type aliases)
This commit is contained in:
parent
d987137b4e
commit
fe6f931ac2
3 changed files with 102 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue