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