@@ -390,7 +390,7 @@ pub trait MacResult {
390390 None
391391 }
392392
393- /// Creates zero or more items in an `extern {}` block
393+ /// Creates zero or more items in an `extern {}` block.
394394 fn make_foreign_items ( self : Box < Self > ) -> Option < SmallVec < [ P < ast:: ForeignItem > ; 1 ] > > {
395395 None
396396 }
@@ -535,7 +535,7 @@ pub struct DummyResult {
535535}
536536
537537impl DummyResult {
538- /// Creates a default MacResult that can be anything.
538+ /// Creates a default ` MacResult` that can be anything.
539539 ///
540540 /// Use this as a return value after hitting any errors and
541541 /// calling `span_err`.
@@ -915,7 +915,7 @@ pub struct ExpansionData {
915915 pub prior_type_ascription : Option < ( Span , bool ) > ,
916916}
917917
918- /// One of these is made during expansion and incrementally updated as we go;
918+ /// An instance of this struct is made during expansion and incrementally updated as we go;
919919/// when a macro expansion occurs, the resulting nodes have the `backtrace()
920920/// -> expn_data` of their expansion context stored into their span.
921921pub struct ExtCtxt < ' a > {
@@ -1135,18 +1135,20 @@ pub fn expr_to_string(
11351135 . map ( |( symbol, style, _) | ( symbol, style) )
11361136}
11371137
1138- /// Non-fatally assert that `tts` is empty. Note that this function
1139- /// returns even when `tts` is non-empty, macros that *need* to stop
1138+ /// Non-fatally assert that `tts` is empty.
1139+ ///
1140+ /// Note that this function
1141+ /// returns even when `tts` is non-empty. Macros that *need* to stop
11401142/// compilation should call
1141- /// `cx.parse_sess.span_diagnostic.abort_if_errors()` (this should be
1142- /// done as rarely as possible).
1143+ /// `cx.parse_sess.span_diagnostic.abort_if_errors()`. (This should be
1144+ /// done as rarely as possible.)
11431145pub fn check_zero_tts ( cx : & ExtCtxt < ' _ > , sp : Span , tts : TokenStream , name : & str ) {
11441146 if !tts. is_empty ( ) {
11451147 cx. span_err ( sp, & format ! ( "{} takes no arguments" , name) ) ;
11461148 }
11471149}
11481150
1149- /// Parse an expression. On error, emit it, advancing to `Eof`, and return `None`.
1151+ /// Parse an expression. On error, emit the error, advance to `Eof`, and return `None`.
11501152pub fn parse_expr ( p : & mut parser:: Parser < ' _ > ) -> Option < P < ast:: Expr > > {
11511153 match p. parse_expr ( ) {
11521154 Ok ( e) => return Some ( e) ,
0 commit comments