]> git.lizzy.rs Git - rust.git/blob - src/test/ui/check-doc-alias-attr-location.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / check-doc-alias-attr-location.rs
1 #![crate_type="lib"]
2
3 pub struct Bar;
4 pub trait Foo {
5     type X;
6     fn foo() -> Self::X;
7 }
8
9 #[doc(alias = "foo")] //~ ERROR
10 extern "C" {}
11
12 #[doc(alias = "bar")] //~ ERROR
13 impl Bar {
14     #[doc(alias = "const")]
15     const A: u32 = 0;
16 }
17
18 #[doc(alias = "foobar")] //~ ERROR
19 impl Foo for Bar {
20     #[doc(alias = "assoc")] //~ ERROR
21     type X = i32;
22     fn foo() -> Self::X {
23         0
24     }
25 }