Add feature gate test for "rustdoc_internal" feature

This commit is contained in:
Guillaume Gomez 2021-11-08 17:27:56 +01:00
parent 1e6ced3532
commit 2ba483883e
3 changed files with 18 additions and 1 deletions

View File

@ -1,7 +1,7 @@
// compile-flags: -Z unstable-options
#![feature(rustc_private)]
#![feature(doc_keyword)]
#![feature(rustdoc_internals)]
#![crate_type = "lib"]

View File

@ -0,0 +1,5 @@
#[doc(keyword = "match")] //~ ERROR: `#[doc(keyword)]` is experimental
/// wonderful
mod foo {}
fn main() {}

View File

@ -0,0 +1,12 @@
error[E0658]: `#[doc(keyword)]` is experimental
--> $DIR/feature-gate-rustdoc_internals.rs:1:1
|
LL | #[doc(keyword = "match")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #90418 <https://github.com/rust-lang/rust/issues/90418> for more information
= help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.