summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/check-doc-alias-attr-location.rs
blob: 6de1960e2e2b6376d02b46e5e065edc342f4c259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pub struct Bar;
pub trait Foo {
    type X;
    fn foo() -> Self::X;
}

#[doc(alias = "foo")] //~ ERROR
extern "C" {}

#[doc(alias = "bar")] //~ ERROR
impl Bar {
    #[doc(alias = "const")]
    pub const A: u32 = 0;
}

#[doc(alias = "foobar")] //~ ERROR
impl Foo for Bar {
    #[doc(alias = "assoc")] //~ ERROR
    type X = i32;
    fn foo() -> Self::X {
        0
    }
}