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,9 @@ 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 the value of a given expression for quick and dirty debugging.
214+ ///
215+ /// An example:
215216///
216217/// ```rust
217218/// let a = 2;
@@ -328,7 +329,7 @@ macro_rules! dbg {
328329 }
329330}
330331
331- /// A macro to await on an async call.
332+ /// Awaits the completion of an async call.
332333#[ macro_export]
333334#[ unstable( feature = "await_macro" , issue = "50547" ) ]
334335#[ allow_internal_unstable( gen_future, generators) ]
@@ -351,7 +352,7 @@ macro_rules! r#await {
351352 } }
352353}
353354
354- /// A macro to select an event from a number of receivers.
355+ /// Selects the first successful receive event from a number of receivers.
355356///
356357/// This macro is used to wait for the first event to occur on a number of
357358/// receivers. It places no restrictions on the types of receivers given to
@@ -423,7 +424,7 @@ macro_rules! assert_approx_eq {
423424#[ cfg( rustdoc) ]
424425mod builtin {
425426
426- /// Unconditionally causes compilation to fail with the given error message when encountered.
427+ /// Causes compilation to fail with the given error message when encountered.
427428 ///
428429 /// This macro should be used when a crate uses a conditional compilation strategy to provide
429430 /// better error messages for erroneous conditions. It's the compiler-level form of [`panic!`],
@@ -465,7 +466,7 @@ mod builtin {
465466 ( $msg: expr, ) => ( { /* compiler built-in */ } ) ;
466467 }
467468
468- /// The core macro for formatted string creation & output .
469+ /// Constructs parameters for the other string-formatting macros .
469470 ///
470471 /// This macro functions by taking a formatting string literal containing
471472 /// `{}` for each additional argument passed. `format_args!` prepares the
@@ -517,7 +518,7 @@ mod builtin {
517518 ( $fmt: expr, $( $args: tt) * ) => ( { /* compiler built-in */ } ) ;
518519 }
519520
520- /// Inspect an environment variable at compile time.
521+ /// Inspects an environment variable at compile time.
521522 ///
522523 /// This macro will expand to the value of the named environment variable at
523524 /// compile time, yielding an expression of type `&'static str`.
@@ -555,7 +556,7 @@ mod builtin {
555556 ( $name: expr, ) => ( { /* compiler built-in */ } ) ;
556557 }
557558
558- /// Optionally inspect an environment variable at compile time.
559+ /// Optionally inspects an environment variable at compile time.
559560 ///
560561 /// If the named environment variable is present at compile time, this will
561562 /// expand into an expression of type `Option<&'static str>` whose value is
@@ -581,7 +582,7 @@ mod builtin {
581582 ( $name: expr, ) => ( { /* compiler built-in */ } ) ;
582583 }
583584
584- /// Concatenate identifiers into one identifier.
585+ /// Concatenates identifiers into one identifier.
585586 ///
586587 /// This macro takes any number of comma-separated identifiers, and
587588 /// concatenates them all into one, yielding an expression which is a new
@@ -634,7 +635,7 @@ mod builtin {
634635 ( $( $e: expr, ) * ) => ( { /* compiler built-in */ } ) ;
635636 }
636637
637- /// A macro which expands to the line number on which it was invoked.
638+ /// Expands to the line number on which it was invoked.
638639 ///
639640 /// With [`column!`] and [`file!`], these macros provide debugging information for
640641 /// developers about the location within the source.
@@ -659,7 +660,7 @@ mod builtin {
659660 #[ rustc_doc_only_macro]
660661 macro_rules! line { ( ) => ( { /* compiler built-in */ } ) }
661662
662- /// A macro which expands to the column number on which it was invoked.
663+ /// Expands to the column number at which it was invoked.
663664 ///
664665 /// With [`line!`] and [`file!`], these macros provide debugging information for
665666 /// developers about the location within the source.
@@ -684,7 +685,7 @@ mod builtin {
684685 #[ rustc_doc_only_macro]
685686 macro_rules! column { ( ) => ( { /* compiler built-in */ } ) }
686687
687- /// A macro which expands to the file name from which it was invoked.
688+ /// Expands to the file name in which it was invoked.
688689 ///
689690 /// With [`line!`] and [`column!`], these macros provide debugging information for
690691 /// developers about the location within the source.
@@ -708,7 +709,7 @@ mod builtin {
708709 #[ rustc_doc_only_macro]
709710 macro_rules! file { ( ) => ( { /* compiler built-in */ } ) }
710711
711- /// A macro which stringifies its arguments.
712+ /// Stringifies its arguments.
712713 ///
713714 /// This macro will yield an expression of type `&'static str` which is the
714715 /// stringification of all the tokens passed to the macro. No restrictions
@@ -822,7 +823,7 @@ mod builtin {
822823 #[ rustc_doc_only_macro]
823824 macro_rules! module_path { ( ) => ( { /* compiler built-in */ } ) }
824825
825- /// Boolean evaluation of configuration flags, at compile-time.
826+ /// Evaluates boolean combinations of configuration flags at compile-time.
826827 ///
827828 /// In addition to the `#[cfg]` attribute, this macro is provided to allow
828829 /// boolean expression evaluation of configuration flags. This frequently
@@ -844,7 +845,7 @@ mod builtin {
844845 #[ rustc_doc_only_macro]
845846 macro_rules! cfg { ( $( $cfg: tt) * ) => ( { /* compiler built-in */ } ) }
846847
847- /// Parse a file as an expression or an item according to the context.
848+ /// Parses a file as an expression or an item according to the context.
848849 ///
849850 /// The file is located relative to the current file (similarly to how
850851 /// modules are found).
@@ -890,7 +891,7 @@ mod builtin {
890891 ( $file: expr, ) => ( { /* compiler built-in */ } ) ;
891892 }
892893
893- /// Ensure that a boolean expression is `true` at runtime.
894+ /// Asserts that a boolean expression is `true` at runtime.
894895 ///
895896 /// This will invoke the [`panic!`] macro if the provided expression cannot be
896897 /// evaluated to `true` at runtime.
@@ -944,7 +945,7 @@ mod builtin {
944945 }
945946}
946947
947- /// A macro for defining `#[cfg]` if-else statements.
948+ /// Defines `#[cfg]` if-else statements.
948949///
949950/// This is similar to the `if/elif` C preprocessor macro by allowing definition
950951/// of a cascade of `#[cfg]` cases, emitting the implementation which matches
0 commit comments