2021-06-15 17:01:11 +00:00
|
|
|
#![crate_type = "lib"]
|
2020-08-01 15:37:30 +00:00
|
|
|
|
|
|
|
pub struct Bar;
|
|
|
|
pub trait Foo {
|
|
|
|
type X;
|
2021-06-15 17:01:11 +00:00
|
|
|
fn foo(x: u32) -> Self::X;
|
2020-08-01 15:37:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(alias = "foo")] //~ ERROR
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {}
|
2020-08-01 15:37:30 +00:00
|
|
|
|
|
|
|
#[doc(alias = "bar")] //~ ERROR
|
|
|
|
impl Bar {
|
2020-08-11 22:12:49 +00:00
|
|
|
#[doc(alias = "const")]
|
2020-08-01 15:37:30 +00:00
|
|
|
const A: u32 = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(alias = "foobar")] //~ ERROR
|
|
|
|
impl Foo for Bar {
|
|
|
|
#[doc(alias = "assoc")] //~ ERROR
|
|
|
|
type X = i32;
|
2021-06-15 17:01:11 +00:00
|
|
|
fn foo(#[doc(alias = "qux")] _x: u32) -> Self::X {
|
|
|
|
//~^ ERROR
|
2022-07-30 21:45:09 +00:00
|
|
|
#[doc(alias = "stmt")] //~ ERROR
|
|
|
|
let x = 0;
|
|
|
|
#[doc(alias = "expr")] //~ ERROR
|
|
|
|
match x {
|
|
|
|
#[doc(alias = "arm")] //~ ERROR
|
|
|
|
_ => 0
|
|
|
|
}
|
2020-09-01 21:12:52 +00:00
|
|
|
}
|
2020-08-01 15:37:30 +00:00
|
|
|
}
|