@@ -390,7 +390,7 @@ pub trait MacResult {
390
390
None
391
391
}
392
392
393
- /// Creates zero or more items in an `extern {}` block
393
+ /// Creates zero or more items in an `extern {}` block.
394
394
fn make_foreign_items ( self : Box < Self > ) -> Option < SmallVec < [ P < ast:: ForeignItem > ; 1 ] > > {
395
395
None
396
396
}
@@ -535,7 +535,7 @@ pub struct DummyResult {
535
535
}
536
536
537
537
impl DummyResult {
538
- /// Creates a default MacResult that can be anything.
538
+ /// Creates a default ` MacResult` that can be anything.
539
539
///
540
540
/// Use this as a return value after hitting any errors and
541
541
/// calling `span_err`.
@@ -915,7 +915,7 @@ pub struct ExpansionData {
915
915
pub prior_type_ascription : Option < ( Span , bool ) > ,
916
916
}
917
917
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;
919
919
/// when a macro expansion occurs, the resulting nodes have the `backtrace()
920
920
/// -> expn_data` of their expansion context stored into their span.
921
921
pub struct ExtCtxt < ' a > {
@@ -1135,18 +1135,20 @@ pub fn expr_to_string(
1135
1135
. map ( |( symbol, style, _) | ( symbol, style) )
1136
1136
}
1137
1137
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
1140
1142
/// 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.)
1143
1145
pub fn check_zero_tts ( cx : & ExtCtxt < ' _ > , sp : Span , tts : TokenStream , name : & str ) {
1144
1146
if !tts. is_empty ( ) {
1145
1147
cx. span_err ( sp, & format ! ( "{} takes no arguments" , name) ) ;
1146
1148
}
1147
1149
}
1148
1150
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`.
1150
1152
pub fn parse_expr ( p : & mut parser:: Parser < ' _ > ) -> Option < P < ast:: Expr > > {
1151
1153
match p. parse_expr ( ) {
1152
1154
Ok ( e) => return Some ( e) ,
0 commit comments