Skip to content

Commit 2ba4838

Browse files
Add feature gate test for "rustdoc_internal" feature
1 parent 1e6ced3 commit 2ba4838

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

src/test/ui-fulldeps/internal-lints/existing_doc_keyword.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// compile-flags: -Z unstable-options
22

33
#![feature(rustc_private)]
4-
#![feature(doc_keyword)]
4+
#![feature(rustdoc_internals)]
55

66
#![crate_type = "lib"]
77

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#[doc(keyword = "match")] //~ ERROR: `#[doc(keyword)]` is experimental
2+
/// wonderful
3+
mod foo {}
4+
5+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0658]: `#[doc(keyword)]` is experimental
2+
--> $DIR/feature-gate-rustdoc_internals.rs:1:1
3+
|
4+
LL | #[doc(keyword = "match")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #90418 <https://github.com/rust-lang/rust/issues/90418> for more information
8+
= help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)