rust/tests/ui/attributes/doc-attr.rs

18 lines
406 B
Rust
Raw Normal View History

2021-03-01 10:13:06 -06:00
#![crate_type = "lib"]
#![doc(as_ptr)]
//~^ ERROR unknown `doc` attribute
2021-03-01 10:13:06 -06:00
#[doc(as_ptr)]
//~^ ERROR unknown `doc` attribute
2021-03-01 10:13:06 -06:00
pub fn foo() {}
#[doc(123)]
//~^ ERROR invalid `doc` attribute
#[doc("hello", "bar")]
//~^ ERROR invalid `doc` attribute
//~| ERROR invalid `doc` attribute
#[doc(foo::bar, crate::bar::baz = "bye")]
//~^ ERROR unknown `doc` attribute
//~| ERROR unknown `doc` attribute
fn bar() {}