Avoid using #[macro_export] for documenting builtin macros
This commit is contained in:
@@ -543,6 +543,7 @@ macro_rules! unimplemented {
|
||||
/// into libsyntax itself.
|
||||
///
|
||||
/// For more information, see documentation for `std`'s macros.
|
||||
#[cfg(dox)]
|
||||
mod builtin {
|
||||
|
||||
/// Unconditionally causes compilation to fail with the given error message when encountered.
|
||||
@@ -551,8 +552,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::compile_error!`]: ../std/macro.compile_error.html
|
||||
#[stable(feature = "compile_error_macro", since = "1.20.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! compile_error {
|
||||
($msg:expr) => ({ /* compiler built-in */ });
|
||||
($msg:expr,) => ({ /* compiler built-in */ });
|
||||
@@ -564,8 +564,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::format_args!`]: ../std/macro.format_args.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! format_args {
|
||||
($fmt:expr) => ({ /* compiler built-in */ });
|
||||
($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ });
|
||||
@@ -577,8 +576,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::env!`]: ../std/macro.env.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! env {
|
||||
($name:expr) => ({ /* compiler built-in */ });
|
||||
($name:expr,) => ({ /* compiler built-in */ });
|
||||
@@ -590,8 +588,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::option_env!`]: ../std/macro.option_env.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! option_env {
|
||||
($name:expr) => ({ /* compiler built-in */ });
|
||||
($name:expr,) => ({ /* compiler built-in */ });
|
||||
@@ -603,8 +600,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::concat_idents!`]: ../std/macro.concat_idents.html
|
||||
#[unstable(feature = "concat_idents_macro", issue = "29599")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! concat_idents {
|
||||
($($e:ident),+) => ({ /* compiler built-in */ });
|
||||
($($e:ident,)+) => ({ /* compiler built-in */ });
|
||||
@@ -616,8 +612,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::concat!`]: ../std/macro.concat.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! concat {
|
||||
($($e:expr),*) => ({ /* compiler built-in */ });
|
||||
($($e:expr,)*) => ({ /* compiler built-in */ });
|
||||
@@ -629,8 +624,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::line!`]: ../std/macro.line.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! line { () => ({ /* compiler built-in */ }) }
|
||||
|
||||
/// A macro which expands to the column number on which it was invoked.
|
||||
@@ -639,8 +633,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::column!`]: ../std/macro.column.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! column { () => ({ /* compiler built-in */ }) }
|
||||
|
||||
/// A macro which expands to the file name from which it was invoked.
|
||||
@@ -649,8 +642,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::file!`]: ../std/macro.file.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! file { () => ({ /* compiler built-in */ }) }
|
||||
|
||||
/// A macro which stringifies its arguments.
|
||||
@@ -659,8 +651,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::stringify!`]: ../std/macro.stringify.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! stringify { ($($t:tt)*) => ({ /* compiler built-in */ }) }
|
||||
|
||||
/// Includes a utf8-encoded file as a string.
|
||||
@@ -669,8 +660,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::include_str!`]: ../std/macro.include_str.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! include_str {
|
||||
($file:expr) => ({ /* compiler built-in */ });
|
||||
($file:expr,) => ({ /* compiler built-in */ });
|
||||
@@ -682,8 +672,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::include_bytes!`]: ../std/macro.include_bytes.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! include_bytes {
|
||||
($file:expr) => ({ /* compiler built-in */ });
|
||||
($file:expr,) => ({ /* compiler built-in */ });
|
||||
@@ -695,8 +684,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::module_path!`]: ../std/macro.module_path.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! module_path { () => ({ /* compiler built-in */ }) }
|
||||
|
||||
/// Boolean evaluation of configuration flags, at compile-time.
|
||||
@@ -705,8 +693,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::cfg!`]: ../std/macro.cfg.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! cfg { ($($cfg:tt)*) => ({ /* compiler built-in */ }) }
|
||||
|
||||
/// Parse a file as an expression or an item according to the context.
|
||||
@@ -715,8 +702,7 @@ mod builtin {
|
||||
///
|
||||
/// [`std::include!`]: ../std/macro.include.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[macro_export]
|
||||
#[cfg(dox)]
|
||||
#[rustc_doc_only_macro]
|
||||
macro_rules! include {
|
||||
($file:expr) => ({ /* compiler built-in */ });
|
||||
($file:expr,) => ({ /* compiler built-in */ });
|
||||
@@ -727,9 +713,8 @@ mod builtin {
|
||||
/// For more information, see the documentation for [`std::assert!`].
|
||||
///
|
||||
/// [`std::assert!`]: ../std/macro.assert.html
|
||||
#[macro_export]
|
||||
#[rustc_doc_only_macro]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg(dox)]
|
||||
macro_rules! assert {
|
||||
($cond:expr) => ({ /* compiler built-in */ });
|
||||
($cond:expr,) => ({ /* compiler built-in */ });
|
||||
|
||||
Reference in New Issue
Block a user