2020-12-01 16:42:07 -06:00
|
|
|
#![crate_type = "lib"]
|
|
|
|
#![feature(doc_keyword)]
|
|
|
|
|
|
|
|
#![doc(keyword = "hello")] //~ ERROR
|
|
|
|
|
|
|
|
#[doc(keyword = "hell")] //~ ERROR
|
|
|
|
mod foo {
|
|
|
|
fn hell() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(keyword = "hall")] //~ ERROR
|
|
|
|
fn foo() {}
|
2021-06-17 10:28:55 -05:00
|
|
|
|
|
|
|
|
|
|
|
// Regression test for the ICE described in #83512.
|
|
|
|
trait Foo {
|
|
|
|
#[doc(keyword = "match")]
|
|
|
|
//~^ ERROR: `#[doc(keyword = "...")]` can only be used on modules
|
|
|
|
fn quux() {}
|
|
|
|
}
|