rust/tests/rustdoc-ui/check-doc-alias-attr-location.rs

24 lines
373 B
Rust
Raw Normal View History

2020-07-06 09:11:32 -05:00
pub struct Bar;
pub trait Foo {
type X;
fn foo() -> Self::X;
}
2020-07-06 09:11:32 -05:00
#[doc(alias = "foo")] //~ ERROR
2020-09-01 16:12:52 -05:00
extern "C" {}
2020-07-06 09:11:32 -05:00
#[doc(alias = "bar")] //~ ERROR
impl Bar {
#[doc(alias = "const")]
pub const A: u32 = 0;
}
2020-07-06 09:11:32 -05:00
#[doc(alias = "foobar")] //~ ERROR
impl Foo for Bar {
#[doc(alias = "assoc")] //~ ERROR
type X = i32;
2020-09-01 16:12:52 -05:00
fn foo() -> Self::X {
0
}
}