feature gate doc(primitive)

This commit is contained in:
Joshua Nelson 2021-07-10 22:06:10 -04:00
parent 2bd17c1d43
commit 03df65497e
9 changed files with 49 additions and 7 deletions

View file

@ -2,6 +2,7 @@
// check-pass
#![feature(doc_keyword)]
#![feature(doc_primitive)]
//! the features only used in std also have entries in the table, so make sure those get pulled out
//! properly as well

View file

@ -0,0 +1,8 @@
// check-pass
#[doc(primitive = "usize")]
//~^ WARNING `doc(primitive)` should never have been stable
//~| WARNING hard error in a future release
/// Some docs
mod usize {}
fn main() {}

View file

@ -0,0 +1,12 @@
warning: `doc(primitive)` should never have been stable
--> $DIR/feature-gate-doc_primitive.rs:2:7
|
LL | #[doc(primitive = "usize")]
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(invalid_doc_attributes)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
warning: 1 warning emitted