2020-12-01 23:42:07 +01:00
|
|
|
#![crate_type = "lib"]
|
2021-10-30 17:44:50 +02:00
|
|
|
#![feature(rustdoc_internals)]
|
2020-12-01 23:42:07 +01:00
|
|
|
|
|
|
|
#![doc(keyword = "hello")] //~ ERROR
|
|
|
|
|
|
|
|
#[doc(keyword = "hell")] //~ ERROR
|
|
|
|
mod foo {
|
|
|
|
fn hell() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(keyword = "hall")] //~ ERROR
|
|
|
|
fn foo() {}
|
2021-06-17 17:28:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Regression test for the ICE described in #83512.
|
|
|
|
trait Foo {
|
|
|
|
#[doc(keyword = "match")]
|
2022-07-11 18:59:04 +01:00
|
|
|
//~^ ERROR: `#[doc(keyword = "...")]` should be used on modules
|
2021-06-17 17:28:55 +02:00
|
|
|
fn quux() {}
|
|
|
|
}
|