]> git.lizzy.rs Git - rust.git/blob - tests/ui/attributes/invalid-doc-attr.rs
Rollup merge of #107761 - oli-obk:miri_🪵, r=TaKO8Ki
[rust.git] / tests / ui / attributes / invalid-doc-attr.rs
1 #![crate_type = "lib"]
2 #![deny(warnings)]
3
4 #[doc(test(no_crate_inject))]
5 //~^ ERROR can only be applied at the crate level
6 //~| WARN is being phased out
7 //~| HELP to apply to the crate, use an inner attribute
8 //~| SUGGESTION #![doc(test(no_crate_inject))]
9 #[doc(inline)]
10 //~^ ERROR can only be applied to a `use` item
11 //~| WARN is being phased out
12 pub fn foo() {}
13
14 pub mod bar {
15     #![doc(test(no_crate_inject))]
16     //~^ ERROR can only be applied at the crate level
17     //~| WARN is being phased out
18
19     #[doc(test(no_crate_inject))]
20     //~^ ERROR can only be applied at the crate level
21     //~| WARN is being phased out
22     #[doc(inline)]
23     //~^ ERROR can only be applied to a `use` item
24     //~| WARN is being phased out
25     pub fn baz() {}
26 }
27
28 #[doc(inline)]
29 #[doc(no_inline)]
30 //~^^ ERROR conflicting doc inlining attributes
31 //~|  HELP remove one of the conflicting attributes
32 pub use bar::baz;