summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.rs
blob: 537d61364bb1a19b1b7ce828fc661b2d3c4f6f89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// This is ensuring that the UI output for associated items works when it's being documented
// from another item.

#![deny(rustdoc::broken_intra_doc_links)]
#![allow(nonstandard_style)]

pub trait Trait {
    type Trait;
}

/// [`Struct::Trait`]
//~^ ERROR both an associated constant and an associated type
pub struct Struct;

impl Trait for Struct {
    type Trait = Struct;
}

impl Struct {
    pub const Trait: usize = 0;
}