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