@@ -543,6 +543,7 @@ macro_rules! unimplemented {
543
543
/// into libsyntax itself.
544
544
///
545
545
/// For more information, see documentation for `std`'s macros.
546
+ #[ cfg( dox) ]
546
547
mod builtin {
547
548
548
549
/// Unconditionally causes compilation to fail with the given error message when encountered.
@@ -551,8 +552,7 @@ mod builtin {
551
552
///
552
553
/// [`std::compile_error!`]: ../std/macro.compile_error.html
553
554
#[ stable( feature = "compile_error_macro" , since = "1.20.0" ) ]
554
- #[ macro_export]
555
- #[ cfg( dox) ]
555
+ #[ rustc_doc_only_macro]
556
556
macro_rules! compile_error {
557
557
( $msg: expr) => ( { /* compiler built-in */ } ) ;
558
558
( $msg: expr, ) => ( { /* compiler built-in */ } ) ;
@@ -564,8 +564,7 @@ mod builtin {
564
564
///
565
565
/// [`std::format_args!`]: ../std/macro.format_args.html
566
566
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
567
- #[ macro_export]
568
- #[ cfg( dox) ]
567
+ #[ rustc_doc_only_macro]
569
568
macro_rules! format_args {
570
569
( $fmt: expr) => ( { /* compiler built-in */ } ) ;
571
570
( $fmt: expr, $( $args: tt) * ) => ( { /* compiler built-in */ } ) ;
@@ -577,8 +576,7 @@ mod builtin {
577
576
///
578
577
/// [`std::env!`]: ../std/macro.env.html
579
578
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
580
- #[ macro_export]
581
- #[ cfg( dox) ]
579
+ #[ rustc_doc_only_macro]
582
580
macro_rules! env {
583
581
( $name: expr) => ( { /* compiler built-in */ } ) ;
584
582
( $name: expr, ) => ( { /* compiler built-in */ } ) ;
@@ -590,8 +588,7 @@ mod builtin {
590
588
///
591
589
/// [`std::option_env!`]: ../std/macro.option_env.html
592
590
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
593
- #[ macro_export]
594
- #[ cfg( dox) ]
591
+ #[ rustc_doc_only_macro]
595
592
macro_rules! option_env {
596
593
( $name: expr) => ( { /* compiler built-in */ } ) ;
597
594
( $name: expr, ) => ( { /* compiler built-in */ } ) ;
@@ -603,8 +600,7 @@ mod builtin {
603
600
///
604
601
/// [`std::concat_idents!`]: ../std/macro.concat_idents.html
605
602
#[ unstable( feature = "concat_idents_macro" , issue = "29599" ) ]
606
- #[ macro_export]
607
- #[ cfg( dox) ]
603
+ #[ rustc_doc_only_macro]
608
604
macro_rules! concat_idents {
609
605
( $( $e: ident) ,+) => ( { /* compiler built-in */ } ) ;
610
606
( $( $e: ident, ) +) => ( { /* compiler built-in */ } ) ;
@@ -616,8 +612,7 @@ mod builtin {
616
612
///
617
613
/// [`std::concat!`]: ../std/macro.concat.html
618
614
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
619
- #[ macro_export]
620
- #[ cfg( dox) ]
615
+ #[ rustc_doc_only_macro]
621
616
macro_rules! concat {
622
617
( $( $e: expr) ,* ) => ( { /* compiler built-in */ } ) ;
623
618
( $( $e: expr, ) * ) => ( { /* compiler built-in */ } ) ;
@@ -629,8 +624,7 @@ mod builtin {
629
624
///
630
625
/// [`std::line!`]: ../std/macro.line.html
631
626
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
632
- #[ macro_export]
633
- #[ cfg( dox) ]
627
+ #[ rustc_doc_only_macro]
634
628
macro_rules! line { ( ) => ( { /* compiler built-in */ } ) }
635
629
636
630
/// A macro which expands to the column number on which it was invoked.
@@ -639,8 +633,7 @@ mod builtin {
639
633
///
640
634
/// [`std::column!`]: ../std/macro.column.html
641
635
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
642
- #[ macro_export]
643
- #[ cfg( dox) ]
636
+ #[ rustc_doc_only_macro]
644
637
macro_rules! column { ( ) => ( { /* compiler built-in */ } ) }
645
638
646
639
/// A macro which expands to the file name from which it was invoked.
@@ -649,8 +642,7 @@ mod builtin {
649
642
///
650
643
/// [`std::file!`]: ../std/macro.file.html
651
644
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
652
- #[ macro_export]
653
- #[ cfg( dox) ]
645
+ #[ rustc_doc_only_macro]
654
646
macro_rules! file { ( ) => ( { /* compiler built-in */ } ) }
655
647
656
648
/// A macro which stringifies its arguments.
@@ -659,8 +651,7 @@ mod builtin {
659
651
///
660
652
/// [`std::stringify!`]: ../std/macro.stringify.html
661
653
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
662
- #[ macro_export]
663
- #[ cfg( dox) ]
654
+ #[ rustc_doc_only_macro]
664
655
macro_rules! stringify { ( $( $t: tt) * ) => ( { /* compiler built-in */ } ) }
665
656
666
657
/// Includes a utf8-encoded file as a string.
@@ -669,8 +660,7 @@ mod builtin {
669
660
///
670
661
/// [`std::include_str!`]: ../std/macro.include_str.html
671
662
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
672
- #[ macro_export]
673
- #[ cfg( dox) ]
663
+ #[ rustc_doc_only_macro]
674
664
macro_rules! include_str {
675
665
( $file: expr) => ( { /* compiler built-in */ } ) ;
676
666
( $file: expr, ) => ( { /* compiler built-in */ } ) ;
@@ -682,8 +672,7 @@ mod builtin {
682
672
///
683
673
/// [`std::include_bytes!`]: ../std/macro.include_bytes.html
684
674
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
685
- #[ macro_export]
686
- #[ cfg( dox) ]
675
+ #[ rustc_doc_only_macro]
687
676
macro_rules! include_bytes {
688
677
( $file: expr) => ( { /* compiler built-in */ } ) ;
689
678
( $file: expr, ) => ( { /* compiler built-in */ } ) ;
@@ -695,8 +684,7 @@ mod builtin {
695
684
///
696
685
/// [`std::module_path!`]: ../std/macro.module_path.html
697
686
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
698
- #[ macro_export]
699
- #[ cfg( dox) ]
687
+ #[ rustc_doc_only_macro]
700
688
macro_rules! module_path { ( ) => ( { /* compiler built-in */ } ) }
701
689
702
690
/// Boolean evaluation of configuration flags, at compile-time.
@@ -705,8 +693,7 @@ mod builtin {
705
693
///
706
694
/// [`std::cfg!`]: ../std/macro.cfg.html
707
695
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
708
- #[ macro_export]
709
- #[ cfg( dox) ]
696
+ #[ rustc_doc_only_macro]
710
697
macro_rules! cfg { ( $( $cfg: tt) * ) => ( { /* compiler built-in */ } ) }
711
698
712
699
/// Parse a file as an expression or an item according to the context.
@@ -715,8 +702,7 @@ mod builtin {
715
702
///
716
703
/// [`std::include!`]: ../std/macro.include.html
717
704
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
718
- #[ macro_export]
719
- #[ cfg( dox) ]
705
+ #[ rustc_doc_only_macro]
720
706
macro_rules! include {
721
707
( $file: expr) => ( { /* compiler built-in */ } ) ;
722
708
( $file: expr, ) => ( { /* compiler built-in */ } ) ;
@@ -727,9 +713,8 @@ mod builtin {
727
713
/// For more information, see the documentation for [`std::assert!`].
728
714
///
729
715
/// [`std::assert!`]: ../std/macro.assert.html
730
- #[ macro_export ]
716
+ #[ rustc_doc_only_macro ]
731
717
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
732
- #[ cfg( dox) ]
733
718
macro_rules! assert {
734
719
( $cond: expr) => ( { /* compiler built-in */ } ) ;
735
720
( $cond: expr, ) => ( { /* compiler built-in */ } ) ;
0 commit comments