44//! library. Each macro is available for use when linking against the standard
55//! library.
66
7- /// The entry point for panic of Rust threads .
7+ /// Panics the current thread .
88///
99/// This allows a program to terminate immediately and provide feedback
1010/// to the caller of the program. `panic!` should be used when a program reaches
@@ -70,7 +70,7 @@ macro_rules! panic {
7070 } ) ;
7171}
7272
73- /// Macro for printing to the standard output.
73+ /// Prints to the standard output.
7474///
7575/// Equivalent to the [`println!`] macro except that a newline is not printed at
7676/// the end of the message.
@@ -116,7 +116,7 @@ macro_rules! print {
116116 ( $( $arg: tt) * ) => ( $crate:: io:: _print( format_args!( $( $arg) * ) ) ) ;
117117}
118118
119- /// Macro for printing to the standard output, with a newline.
119+ /// Prints to the standard output, with a newline.
120120///
121121/// On all platforms, the newline is the LINE FEED character (`\n`/`U+000A`) alone
122122/// (no additional CARRIAGE RETURN (`\r`/`U+000D`).
@@ -151,7 +151,7 @@ macro_rules! println {
151151 } )
152152}
153153
154- /// Macro for printing to the standard error.
154+ /// Prints to the standard error.
155155///
156156/// Equivalent to the [`print!`] macro, except that output goes to
157157/// [`io::stderr`] instead of `io::stdout`. See [`print!`] for
@@ -179,7 +179,7 @@ macro_rules! eprint {
179179 ( $( $arg: tt) * ) => ( $crate:: io:: _eprint( format_args!( $( $arg) * ) ) ) ;
180180}
181181
182- /// Macro for printing to the standard error, with a newline.
182+ /// Prints to the standard error, with a newline.
183183///
184184/// Equivalent to the [`println!`] macro, except that output goes to
185185/// [`io::stderr`] instead of `io::stdout`. See [`println!`] for
@@ -210,8 +210,10 @@ macro_rules! eprintln {
210210 } )
211211}
212212
213- /// A macro for quick and dirty debugging with which you can inspect
214- /// the value of a given expression. An example:
213+ /// Prints and returns the value of a given expression for quick and dirty
214+ /// debugging.
215+ ///
216+ /// An example:
215217///
216218/// ```rust
217219/// let a = 2;
@@ -328,7 +330,7 @@ macro_rules! dbg {
328330 }
329331}
330332
331- /// A macro to await on an async call.
333+ /// Awaits the completion of an async call.
332334#[ macro_export]
333335#[ unstable( feature = "await_macro" , issue = "50547" ) ]
334336#[ allow_internal_unstable( gen_future, generators) ]
@@ -351,7 +353,7 @@ macro_rules! r#await {
351353 } }
352354}
353355
354- /// A macro to select an event from a number of receivers.
356+ /// Selects the first successful receive event from a number of receivers.
355357///
356358/// This macro is used to wait for the first event to occur on a number of
357359/// receivers. It places no restrictions on the types of receivers given to
@@ -423,7 +425,7 @@ macro_rules! assert_approx_eq {
423425#[ cfg( rustdoc) ]
424426mod builtin {
425427
426- /// Unconditionally causes compilation to fail with the given error message when encountered.
428+ /// Causes compilation to fail with the given error message when encountered.
427429 ///
428430 /// This macro should be used when a crate uses a conditional compilation strategy to provide
429431 /// better error messages for erroneous conditions. It's the compiler-level form of [`panic!`],
@@ -465,7 +467,7 @@ mod builtin {
465467 ( $msg: expr, ) => ( { /* compiler built-in */ } ) ;
466468 }
467469
468- /// The core macro for formatted string creation & output .
470+ /// Constructs parameters for the other string-formatting macros .
469471 ///
470472 /// This macro functions by taking a formatting string literal containing
471473 /// `{}` for each additional argument passed. `format_args!` prepares the
@@ -517,7 +519,7 @@ mod builtin {
517519 ( $fmt: expr, $( $args: tt) * ) => ( { /* compiler built-in */ } ) ;
518520 }
519521
520- /// Inspect an environment variable at compile time.
522+ /// Inspects an environment variable at compile time.
521523 ///
522524 /// This macro will expand to the value of the named environment variable at
523525 /// compile time, yielding an expression of type `&'static str`.
@@ -555,7 +557,7 @@ mod builtin {
555557 ( $name: expr, ) => ( { /* compiler built-in */ } ) ;
556558 }
557559
558- /// Optionally inspect an environment variable at compile time.
560+ /// Optionally inspects an environment variable at compile time.
559561 ///
560562 /// If the named environment variable is present at compile time, this will
561563 /// expand into an expression of type `Option<&'static str>` whose value is
@@ -581,7 +583,7 @@ mod builtin {
581583 ( $name: expr, ) => ( { /* compiler built-in */ } ) ;
582584 }
583585
584- /// Concatenate identifiers into one identifier.
586+ /// Concatenates identifiers into one identifier.
585587 ///
586588 /// This macro takes any number of comma-separated identifiers, and
587589 /// concatenates them all into one, yielding an expression which is a new
@@ -634,7 +636,7 @@ mod builtin {
634636 ( $( $e: expr, ) * ) => ( { /* compiler built-in */ } ) ;
635637 }
636638
637- /// A macro which expands to the line number on which it was invoked.
639+ /// Expands to the line number on which it was invoked.
638640 ///
639641 /// With [`column!`] and [`file!`], these macros provide debugging information for
640642 /// developers about the location within the source.
@@ -659,7 +661,7 @@ mod builtin {
659661 #[ rustc_doc_only_macro]
660662 macro_rules! line { ( ) => ( { /* compiler built-in */ } ) }
661663
662- /// A macro which expands to the column number on which it was invoked.
664+ /// Expands to the column number at which it was invoked.
663665 ///
664666 /// With [`line!`] and [`file!`], these macros provide debugging information for
665667 /// developers about the location within the source.
@@ -684,7 +686,7 @@ mod builtin {
684686 #[ rustc_doc_only_macro]
685687 macro_rules! column { ( ) => ( { /* compiler built-in */ } ) }
686688
687- /// A macro which expands to the file name from which it was invoked.
689+ /// Expands to the file name in which it was invoked.
688690 ///
689691 /// With [`line!`] and [`column!`], these macros provide debugging information for
690692 /// developers about the location within the source.
@@ -708,7 +710,7 @@ mod builtin {
708710 #[ rustc_doc_only_macro]
709711 macro_rules! file { ( ) => ( { /* compiler built-in */ } ) }
710712
711- /// A macro which stringifies its arguments.
713+ /// Stringifies its arguments.
712714 ///
713715 /// This macro will yield an expression of type `&'static str` which is the
714716 /// stringification of all the tokens passed to the macro. No restrictions
@@ -822,7 +824,7 @@ mod builtin {
822824 #[ rustc_doc_only_macro]
823825 macro_rules! module_path { ( ) => ( { /* compiler built-in */ } ) }
824826
825- /// Boolean evaluation of configuration flags, at compile-time.
827+ /// Evaluates boolean combinations of configuration flags at compile-time.
826828 ///
827829 /// In addition to the `#[cfg]` attribute, this macro is provided to allow
828830 /// boolean expression evaluation of configuration flags. This frequently
@@ -844,7 +846,7 @@ mod builtin {
844846 #[ rustc_doc_only_macro]
845847 macro_rules! cfg { ( $( $cfg: tt) * ) => ( { /* compiler built-in */ } ) }
846848
847- /// Parse a file as an expression or an item according to the context.
849+ /// Parses a file as an expression or an item according to the context.
848850 ///
849851 /// The file is located relative to the current file (similarly to how
850852 /// modules are found).
@@ -890,7 +892,7 @@ mod builtin {
890892 ( $file: expr, ) => ( { /* compiler built-in */ } ) ;
891893 }
892894
893- /// Ensure that a boolean expression is `true` at runtime.
895+ /// Asserts that a boolean expression is `true` at runtime.
894896 ///
895897 /// This will invoke the [`panic!`] macro if the provided expression cannot be
896898 /// evaluated to `true` at runtime.
@@ -944,7 +946,7 @@ mod builtin {
944946 }
945947}
946948
947- /// A macro for defining `#[cfg]` if-else statements.
949+ /// Defines `#[cfg]` if-else statements.
948950///
949951/// This is similar to the `if/elif` C preprocessor macro by allowing definition
950952/// of a cascade of `#[cfg]` cases, emitting the implementation which matches
0 commit comments