Rollup merge of #80534 - LeSeulArtichaut:doc-include, r=jyn514

Use #[doc = include_str!()] in std

cc https://github.com/rust-lang/rust/issues/78835#issuecomment-742531894
r? `````@jyn514`````
This commit is contained in:
Dylan DPC 2021-02-25 14:33:47 +01:00 committed by GitHub
commit cb2b4ff714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#[doc(include = "panic.md")]
#[doc = include_str!("panic.md")]
#[macro_export]
#[rustc_builtin_macro = "core_panic"]
#[allow_internal_unstable(edition_panic)]

View File

@ -264,7 +264,6 @@
#![feature(exhaustive_patterns)]
#![feature(extend_one)]
#![feature(extended_key_value_attributes)]
#![feature(external_doc)]
#![feature(fn_traits)]
#![feature(format_args_nl)]
#![feature(gen_future)]

View File

@ -4,7 +4,7 @@
//! library. Each macro is available for use when linking against the standard
//! library.
#[doc(include = "../../core/src/macros/panic.md")]
#[doc = include_str!("../../core/src/macros/panic.md")]
#[macro_export]
#[rustc_builtin_macro = "std_panic"]
#[stable(feature = "rust1", since = "1.0.0")]

View File

@ -18,7 +18,7 @@ macro_rules! type_alias_no_nz {
$Docfile:tt, $Alias:ident = $Real:ty;
$( $Cfg:tt )*
} => {
#[doc(include = $Docfile)]
#[doc = include_str!($Docfile)]
$( $Cfg )*
#[stable(feature = "raw_os", since = "1.1.0")]
pub type $Alias = $Real;