@@ -176,7 +176,7 @@ pub enum GenericArgs {
176176 AngleBracketed ( AngleBracketedArgs ) ,
177177 /// The `(A, B)` and `C` in `Foo(A, B) -> C`.
178178 Parenthesized ( ParenthesizedArgs ) ,
179- /// `(..)` in return type notation
179+ /// `(..)` in return type notation.
180180 ParenthesizedElided ( Span ) ,
181181}
182182
@@ -197,11 +197,11 @@ impl GenericArgs {
197197/// Concrete argument in the sequence of generic args.
198198#[ derive( Clone , Encodable , Decodable , Debug ) ]
199199pub enum GenericArg {
200- /// `'a` in `Foo<'a>`
200+ /// `'a` in `Foo<'a>`.
201201 Lifetime ( Lifetime ) ,
202- /// `Bar` in `Foo<Bar>`
202+ /// `Bar` in `Foo<Bar>`.
203203 Type ( P < Ty > ) ,
204- /// `1` in `Foo<1>`
204+ /// `1` in `Foo<1>`.
205205 Const ( AnonConst ) ,
206206}
207207
@@ -355,7 +355,7 @@ pub enum GenericParamKind {
355355 ty : P < Ty > ,
356356 /// Span of the `const` keyword.
357357 kw_span : Span ,
358- /// Optional default value for the const generic param
358+ /// Optional default value for the const generic param.
359359 default : Option < AnonConst > ,
360360 } ,
361361}
@@ -832,7 +832,7 @@ pub enum PatKind {
832832 /// only one rest pattern may occur in the pattern sequences.
833833 Rest ,
834834
835- // A never pattern `!`
835+ // A never pattern `!`.
836836 Never ,
837837
838838 /// Parentheses in patterns used for grouping (i.e., `(PAT)`).
@@ -1121,9 +1121,9 @@ impl LocalKind {
11211121#[ derive( Clone , Encodable , Decodable , Debug ) ]
11221122pub struct Arm {
11231123 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 => {}, _ => {} }`.
11251125 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 => {}, _ => {} }`.
11271127 pub guard : Option < P < Expr > > ,
11281128 /// Match arm body. Omitted if the pattern is a never pattern.
11291129 pub body : Option < P < Expr > > ,
@@ -1354,12 +1354,12 @@ pub struct Closure {
13541354 pub fn_arg_span : Span ,
13551355}
13561356
1357- /// Limit types of a range (inclusive or exclusive)
1357+ /// Limit types of a range (inclusive or exclusive).
13581358#[ derive( Copy , Clone , PartialEq , Encodable , Decodable , Debug ) ]
13591359pub enum RangeLimits {
1360- /// Inclusive at the beginning, exclusive at the end
1360+ /// Inclusive at the beginning, exclusive at the end.
13611361 HalfOpen ,
1362- /// Inclusive at the beginning and end
1362+ /// Inclusive at the beginning and end.
13631363 Closed ,
13641364}
13651365
@@ -1400,9 +1400,9 @@ pub struct StructExpr {
14001400pub enum ExprKind {
14011401 /// An array (e.g, `[a, b, c, d]`).
14021402 Array ( ThinVec < P < Expr > > ) ,
1403- /// Allow anonymous constants from an inline `const` block
1403+ /// Allow anonymous constants from an inline `const` block.
14041404 ConstBlock ( AnonConst ) ,
1405- /// A function call
1405+ /// A function call.
14061406 ///
14071407 /// The first field resolves to the function itself,
14081408 /// and the second field is the list of arguments.
@@ -1456,7 +1456,7 @@ pub enum ExprKind {
14561456 /// A block (`'label: { ... }`).
14571457 Block ( P < Block > , Option < Label > ) ,
14581458 /// An `async` block (`async move { ... }`),
1459- /// or a `gen` block (`gen move { ... }`)
1459+ /// or a `gen` block (`gen move { ... }`).
14601460 ///
14611461 /// The span is the "decl", which is the header before the body `{ }`
14621462 /// including the `asyng`/`gen` keywords and possibly `move`.
@@ -2156,9 +2156,9 @@ pub enum TyKind {
21562156 Never ,
21572157 /// A tuple (`(A, B, C, D,...)`).
21582158 Tup ( ThinVec < P < Ty > > ) ,
2159- /// An anonymous struct type i.e. `struct { foo: Type }`
2159+ /// An anonymous struct type i.e. `struct { foo: Type }`.
21602160 AnonStruct ( NodeId , ThinVec < FieldDef > ) ,
2161- /// An anonymous union type i.e. `union { bar: Type }`
2161+ /// An anonymous union type i.e. `union { bar: Type }`.
21622162 AnonUnion ( NodeId , ThinVec < FieldDef > ) ,
21632163 /// A path (`module::module::...::Type`), optionally
21642164 /// "qualified", e.g., `<Vec<T> as SomeTrait>::SomeType`.
@@ -2232,9 +2232,9 @@ pub enum TraitObjectSyntax {
22322232
22332233#[ derive( Clone , Encodable , Decodable , Debug ) ]
22342234pub enum PreciseCapturingArg {
2235- /// Lifetime parameter
2235+ /// Lifetime parameter.
22362236 Lifetime ( Lifetime ) ,
2237- /// Type or const parameter
2237+ /// Type or const parameter.
22382238 Arg ( Path , NodeId ) ,
22392239}
22402240
@@ -2528,11 +2528,11 @@ pub enum Safety {
25282528/// Iterator`.
25292529#[ derive( Copy , Clone , Encodable , Decodable , Debug ) ]
25302530pub enum CoroutineKind {
2531- /// `async`, which returns an `impl Future`
2531+ /// `async`, which returns an `impl Future`.
25322532 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`.
25342534 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`.
25362536 AsyncGen { span : Span , closure_id : NodeId , return_impl_trait_id : NodeId } ,
25372537}
25382538
@@ -2749,7 +2749,7 @@ pub struct Variant {
27492749 pub data : VariantData ,
27502750 /// Explicit discriminant, e.g., `Foo = 1`.
27512751 pub disr_expr : Option < AnonConst > ,
2752- /// Is a macro placeholder
2752+ /// Is a macro placeholder.
27532753 pub is_placeholder : bool ,
27542754}
27552755
@@ -3023,19 +3023,19 @@ impl Item {
30233023/// `extern` qualifier on a function item or function type.
30243024#[ derive( Clone , Copy , Encodable , Decodable , Debug ) ]
30253025pub enum Extern {
3026- /// No explicit extern keyword was used
3026+ /// No explicit extern keyword was used.
30273027 ///
3028- /// E.g. `fn foo() {}`
3028+ /// E.g. `fn foo() {}`.
30293029 None ,
3030- /// An explicit extern keyword was used, but with implicit ABI
3030+ /// An explicit extern keyword was used, but with implicit ABI.
30313031 ///
3032- /// E.g. `extern fn foo() {}`
3032+ /// E.g. `extern fn foo() {}`.
30333033 ///
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`).
30353035 Implicit ( Span ) ,
3036- /// An explicit extern keyword was used with an explicit ABI
3036+ /// An explicit extern keyword was used with an explicit ABI.
30373037 ///
3038- /// E.g. `extern "C" fn foo() {}`
3038+ /// E.g. `extern "C" fn foo() {}`.
30393039 Explicit ( StrLit , Span ) ,
30403040}
30413041
@@ -3054,13 +3054,13 @@ impl Extern {
30543054/// included in this struct (e.g., `async unsafe fn` or `const extern "C" fn`).
30553055#[ derive( Clone , Copy , Encodable , Decodable , Debug ) ]
30563056pub struct FnHeader {
3057- /// Whether this is `unsafe`, or has a default safety
3057+ /// Whether this is `unsafe`, or has a default safety.
30583058 pub safety : Safety ,
30593059 /// Whether this is `async`, `gen`, or nothing.
30603060 pub coroutine_kind : Option < CoroutineKind > ,
30613061 /// The `const` keyword, if any
30623062 pub constness : Const ,
3063- /// The `extern` keyword and corresponding ABI string, if any
3063+ /// The `extern` keyword and corresponding ABI string, if any.
30643064 pub ext : Extern ,
30653065}
30663066
@@ -3254,7 +3254,7 @@ pub enum ItemKind {
32543254 ///
32553255 /// E.g., `trait Foo { .. }`, `trait Foo<T> { .. }` or `auto trait Foo {}`.
32563256 Trait ( Box < Trait > ) ,
3257- /// Trait alias
3257+ /// Trait alias.
32583258 ///
32593259 /// E.g., `trait Foo = Bar + Quux;`.
32603260 TraitAlias ( Generics , GenericBounds ) ,
0 commit comments