]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rustdoc/doc_keyword.rs
Auto merge of #99028 - tmiasko:inline, r=estebank
[rust.git] / src / test / ui / rustdoc / doc_keyword.rs
1 #![crate_type = "lib"]
2 #![feature(rustdoc_internals)]
3
4 #![doc(keyword = "hello")] //~ ERROR
5
6 #[doc(keyword = "hell")] //~ ERROR
7 mod foo {
8     fn hell() {}
9 }
10
11 #[doc(keyword = "hall")] //~ ERROR
12 fn foo() {}
13
14
15 // Regression test for the ICE described in #83512.
16 trait Foo {
17     #[doc(keyword = "match")]
18     //~^ ERROR: `#[doc(keyword = "...")]` can only be used on modules
19     fn quux() {}
20 }