@@ -176,7 +176,7 @@ pub enum GenericArgs {
176
176
AngleBracketed ( AngleBracketedArgs ) ,
177
177
/// The `(A, B)` and `C` in `Foo(A, B) -> C`.
178
178
Parenthesized ( ParenthesizedArgs ) ,
179
- /// `(..)` in return type notation
179
+ /// `(..)` in return type notation.
180
180
ParenthesizedElided ( Span ) ,
181
181
}
182
182
@@ -197,11 +197,11 @@ impl GenericArgs {
197
197
/// Concrete argument in the sequence of generic args.
198
198
#[ derive( Clone , Encodable , Decodable , Debug ) ]
199
199
pub enum GenericArg {
200
- /// `'a` in `Foo<'a>`
200
+ /// `'a` in `Foo<'a>`.
201
201
Lifetime ( Lifetime ) ,
202
- /// `Bar` in `Foo<Bar>`
202
+ /// `Bar` in `Foo<Bar>`.
203
203
Type ( P < Ty > ) ,
204
- /// `1` in `Foo<1>`
204
+ /// `1` in `Foo<1>`.
205
205
Const ( AnonConst ) ,
206
206
}
207
207
@@ -355,7 +355,7 @@ pub enum GenericParamKind {
355
355
ty : P < Ty > ,
356
356
/// Span of the `const` keyword.
357
357
kw_span : Span ,
358
- /// Optional default value for the const generic param
358
+ /// Optional default value for the const generic param.
359
359
default : Option < AnonConst > ,
360
360
} ,
361
361
}
@@ -833,7 +833,7 @@ pub enum PatKind {
833
833
/// only one rest pattern may occur in the pattern sequences.
834
834
Rest ,
835
835
836
- // A never pattern `!`
836
+ // A never pattern `!`.
837
837
Never ,
838
838
839
839
/// Parentheses in patterns used for grouping (i.e., `(PAT)`).
@@ -1122,9 +1122,9 @@ impl LocalKind {
1122
1122
#[ derive( Clone , Encodable , Decodable , Debug ) ]
1123
1123
pub struct Arm {
1124
1124
pub attrs : AttrVec ,
1125
- /// Match arm pattern, e.g. `10` in `match foo { 10 => {}, _ => {} }`
1125
+ /// Match arm pattern, e.g. `10` in `match foo { 10 => {}, _ => {} }`.
1126
1126
pub pat : P < Pat > ,
1127
- /// Match arm guard, e.g. `n > 10` in `match foo { n if n > 10 => {}, _ => {} }`
1127
+ /// Match arm guard, e.g. `n > 10` in `match foo { n if n > 10 => {}, _ => {} }`.
1128
1128
pub guard : Option < P < Expr > > ,
1129
1129
/// Match arm body. Omitted if the pattern is a never pattern.
1130
1130
pub body : Option < P < Expr > > ,
@@ -1355,12 +1355,12 @@ pub struct Closure {
1355
1355
pub fn_arg_span : Span ,
1356
1356
}
1357
1357
1358
- /// Limit types of a range (inclusive or exclusive)
1358
+ /// Limit types of a range (inclusive or exclusive).
1359
1359
#[ derive( Copy , Clone , PartialEq , Encodable , Decodable , Debug ) ]
1360
1360
pub enum RangeLimits {
1361
- /// Inclusive at the beginning, exclusive at the end
1361
+ /// Inclusive at the beginning, exclusive at the end.
1362
1362
HalfOpen ,
1363
- /// Inclusive at the beginning and end
1363
+ /// Inclusive at the beginning and end.
1364
1364
Closed ,
1365
1365
}
1366
1366
@@ -1401,9 +1401,9 @@ pub struct StructExpr {
1401
1401
pub enum ExprKind {
1402
1402
/// An array (e.g, `[a, b, c, d]`).
1403
1403
Array ( ThinVec < P < Expr > > ) ,
1404
- /// Allow anonymous constants from an inline `const` block
1404
+ /// Allow anonymous constants from an inline `const` block.
1405
1405
ConstBlock ( AnonConst ) ,
1406
- /// A function call
1406
+ /// A function call.
1407
1407
///
1408
1408
/// The first field resolves to the function itself,
1409
1409
/// and the second field is the list of arguments.
@@ -1457,7 +1457,7 @@ pub enum ExprKind {
1457
1457
/// A block (`'label: { ... }`).
1458
1458
Block ( P < Block > , Option < Label > ) ,
1459
1459
/// An `async` block (`async move { ... }`),
1460
- /// or a `gen` block (`gen move { ... }`)
1460
+ /// or a `gen` block (`gen move { ... }`).
1461
1461
///
1462
1462
/// The span is the "decl", which is the header before the body `{ }`
1463
1463
/// including the `asyng`/`gen` keywords and possibly `move`.
@@ -2157,9 +2157,9 @@ pub enum TyKind {
2157
2157
Never ,
2158
2158
/// A tuple (`(A, B, C, D,...)`).
2159
2159
Tup ( ThinVec < P < Ty > > ) ,
2160
- /// An anonymous struct type i.e. `struct { foo: Type }`
2160
+ /// An anonymous struct type i.e. `struct { foo: Type }`.
2161
2161
AnonStruct ( NodeId , ThinVec < FieldDef > ) ,
2162
- /// An anonymous union type i.e. `union { bar: Type }`
2162
+ /// An anonymous union type i.e. `union { bar: Type }`.
2163
2163
AnonUnion ( NodeId , ThinVec < FieldDef > ) ,
2164
2164
/// A path (`module::module::...::Type`), optionally
2165
2165
/// "qualified", e.g., `<Vec<T> as SomeTrait>::SomeType`.
@@ -2233,9 +2233,9 @@ pub enum TraitObjectSyntax {
2233
2233
2234
2234
#[ derive( Clone , Encodable , Decodable , Debug ) ]
2235
2235
pub enum PreciseCapturingArg {
2236
- /// Lifetime parameter
2236
+ /// Lifetime parameter.
2237
2237
Lifetime ( Lifetime ) ,
2238
- /// Type or const parameter
2238
+ /// Type or const parameter.
2239
2239
Arg ( Path , NodeId ) ,
2240
2240
}
2241
2241
@@ -2529,11 +2529,11 @@ pub enum Safety {
2529
2529
/// Iterator`.
2530
2530
#[ derive( Copy , Clone , Encodable , Decodable , Debug ) ]
2531
2531
pub enum CoroutineKind {
2532
- /// `async`, which returns an `impl Future`
2532
+ /// `async`, which returns an `impl Future`.
2533
2533
Async { span : Span , closure_id : NodeId , return_impl_trait_id : NodeId } ,
2534
- /// `gen`, which returns an `impl Iterator`
2534
+ /// `gen`, which returns an `impl Iterator`.
2535
2535
Gen { span : Span , closure_id : NodeId , return_impl_trait_id : NodeId } ,
2536
- /// `async gen`, which returns an `impl AsyncIterator`
2536
+ /// `async gen`, which returns an `impl AsyncIterator`.
2537
2537
AsyncGen { span : Span , closure_id : NodeId , return_impl_trait_id : NodeId } ,
2538
2538
}
2539
2539
@@ -2750,7 +2750,7 @@ pub struct Variant {
2750
2750
pub data : VariantData ,
2751
2751
/// Explicit discriminant, e.g., `Foo = 1`.
2752
2752
pub disr_expr : Option < AnonConst > ,
2753
- /// Is a macro placeholder
2753
+ /// Is a macro placeholder.
2754
2754
pub is_placeholder : bool ,
2755
2755
}
2756
2756
@@ -3024,19 +3024,19 @@ impl Item {
3024
3024
/// `extern` qualifier on a function item or function type.
3025
3025
#[ derive( Clone , Copy , Encodable , Decodable , Debug ) ]
3026
3026
pub enum Extern {
3027
- /// No explicit extern keyword was used
3027
+ /// No explicit extern keyword was used.
3028
3028
///
3029
- /// E.g. `fn foo() {}`
3029
+ /// E.g. `fn foo() {}`.
3030
3030
None ,
3031
- /// An explicit extern keyword was used, but with implicit ABI
3031
+ /// An explicit extern keyword was used, but with implicit ABI.
3032
3032
///
3033
- /// E.g. `extern fn foo() {}`
3033
+ /// E.g. `extern fn foo() {}`.
3034
3034
///
3035
- /// This is just `extern "C"` (see `rustc_target::spec::abi::Abi::FALLBACK`)
3035
+ /// This is just `extern "C"` (see `rustc_target::spec::abi::Abi::FALLBACK`).
3036
3036
Implicit ( Span ) ,
3037
- /// An explicit extern keyword was used with an explicit ABI
3037
+ /// An explicit extern keyword was used with an explicit ABI.
3038
3038
///
3039
- /// E.g. `extern "C" fn foo() {}`
3039
+ /// E.g. `extern "C" fn foo() {}`.
3040
3040
Explicit ( StrLit , Span ) ,
3041
3041
}
3042
3042
@@ -3055,13 +3055,13 @@ impl Extern {
3055
3055
/// included in this struct (e.g., `async unsafe fn` or `const extern "C" fn`).
3056
3056
#[ derive( Clone , Copy , Encodable , Decodable , Debug ) ]
3057
3057
pub struct FnHeader {
3058
- /// Whether this is `unsafe`, or has a default safety
3058
+ /// Whether this is `unsafe`, or has a default safety.
3059
3059
pub safety : Safety ,
3060
3060
/// Whether this is `async`, `gen`, or nothing.
3061
3061
pub coroutine_kind : Option < CoroutineKind > ,
3062
3062
/// The `const` keyword, if any
3063
3063
pub constness : Const ,
3064
- /// The `extern` keyword and corresponding ABI string, if any
3064
+ /// The `extern` keyword and corresponding ABI string, if any.
3065
3065
pub ext : Extern ,
3066
3066
}
3067
3067
@@ -3255,7 +3255,7 @@ pub enum ItemKind {
3255
3255
///
3256
3256
/// E.g., `trait Foo { .. }`, `trait Foo<T> { .. }` or `auto trait Foo {}`.
3257
3257
Trait ( Box < Trait > ) ,
3258
- /// Trait alias
3258
+ /// Trait alias.
3259
3259
///
3260
3260
/// E.g., `trait Foo = Bar + Quux;`.
3261
3261
TraitAlias ( Generics , GenericBounds ) ,
0 commit comments