]> git.proxmox.com Git - rustc.git/blob - src/test/ui/rustdoc/doc_keyword.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / rustdoc / doc_keyword.rs
1 #![crate_type = "lib"]
2 #![feature(doc_keyword)]
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 }