Skip to content

Commit 67cdb81

Browse files
authored
Unrolled build for rust-lang#127368
Rollup merge of rust-lang#127368 - YohDeadfall:dots-in-docs, r=fmease Added dots at the sentence ends of rustc AST doc Just a tiny improvement for the AST documentation by bringing consistency to sentence ends. I intentionally didn't terminate every sentence, there are still some members not having them, but at least there's no mixing style on the type level.
2 parents 5c08cc7 + 291ed59 commit 67cdb81

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

compiler/rustc_ast/src/ast.rs

+32-32
Original file line numberDiff line numberDiff line change
@@ -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)]
199199
pub 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
}
@@ -833,7 +833,7 @@ pub enum PatKind {
833833
/// only one rest pattern may occur in the pattern sequences.
834834
Rest,
835835

836-
// A never pattern `!`
836+
// A never pattern `!`.
837837
Never,
838838

839839
/// Parentheses in patterns used for grouping (i.e., `(PAT)`).
@@ -1122,9 +1122,9 @@ impl LocalKind {
11221122
#[derive(Clone, Encodable, Decodable, Debug)]
11231123
pub struct Arm {
11241124
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 => {}, _ => {} }`.
11261126
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 => {}, _ => {} }`.
11281128
pub guard: Option<P<Expr>>,
11291129
/// Match arm body. Omitted if the pattern is a never pattern.
11301130
pub body: Option<P<Expr>>,
@@ -1355,12 +1355,12 @@ pub struct Closure {
13551355
pub fn_arg_span: Span,
13561356
}
13571357

1358-
/// Limit types of a range (inclusive or exclusive)
1358+
/// Limit types of a range (inclusive or exclusive).
13591359
#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug)]
13601360
pub enum RangeLimits {
1361-
/// Inclusive at the beginning, exclusive at the end
1361+
/// Inclusive at the beginning, exclusive at the end.
13621362
HalfOpen,
1363-
/// Inclusive at the beginning and end
1363+
/// Inclusive at the beginning and end.
13641364
Closed,
13651365
}
13661366

@@ -1401,9 +1401,9 @@ pub struct StructExpr {
14011401
pub enum ExprKind {
14021402
/// An array (e.g, `[a, b, c, d]`).
14031403
Array(ThinVec<P<Expr>>),
1404-
/// Allow anonymous constants from an inline `const` block
1404+
/// Allow anonymous constants from an inline `const` block.
14051405
ConstBlock(AnonConst),
1406-
/// A function call
1406+
/// A function call.
14071407
///
14081408
/// The first field resolves to the function itself,
14091409
/// and the second field is the list of arguments.
@@ -1457,7 +1457,7 @@ pub enum ExprKind {
14571457
/// A block (`'label: { ... }`).
14581458
Block(P<Block>, Option<Label>),
14591459
/// An `async` block (`async move { ... }`),
1460-
/// or a `gen` block (`gen move { ... }`)
1460+
/// or a `gen` block (`gen move { ... }`).
14611461
///
14621462
/// The span is the "decl", which is the header before the body `{ }`
14631463
/// including the `asyng`/`gen` keywords and possibly `move`.
@@ -2157,9 +2157,9 @@ pub enum TyKind {
21572157
Never,
21582158
/// A tuple (`(A, B, C, D,...)`).
21592159
Tup(ThinVec<P<Ty>>),
2160-
/// An anonymous struct type i.e. `struct { foo: Type }`
2160+
/// An anonymous struct type i.e. `struct { foo: Type }`.
21612161
AnonStruct(NodeId, ThinVec<FieldDef>),
2162-
/// An anonymous union type i.e. `union { bar: Type }`
2162+
/// An anonymous union type i.e. `union { bar: Type }`.
21632163
AnonUnion(NodeId, ThinVec<FieldDef>),
21642164
/// A path (`module::module::...::Type`), optionally
21652165
/// "qualified", e.g., `<Vec<T> as SomeTrait>::SomeType`.
@@ -2233,9 +2233,9 @@ pub enum TraitObjectSyntax {
22332233

22342234
#[derive(Clone, Encodable, Decodable, Debug)]
22352235
pub enum PreciseCapturingArg {
2236-
/// Lifetime parameter
2236+
/// Lifetime parameter.
22372237
Lifetime(Lifetime),
2238-
/// Type or const parameter
2238+
/// Type or const parameter.
22392239
Arg(Path, NodeId),
22402240
}
22412241

@@ -2529,11 +2529,11 @@ pub enum Safety {
25292529
/// Iterator`.
25302530
#[derive(Copy, Clone, Encodable, Decodable, Debug)]
25312531
pub enum CoroutineKind {
2532-
/// `async`, which returns an `impl Future`
2532+
/// `async`, which returns an `impl Future`.
25332533
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`.
25352535
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`.
25372537
AsyncGen { span: Span, closure_id: NodeId, return_impl_trait_id: NodeId },
25382538
}
25392539

@@ -2750,7 +2750,7 @@ pub struct Variant {
27502750
pub data: VariantData,
27512751
/// Explicit discriminant, e.g., `Foo = 1`.
27522752
pub disr_expr: Option<AnonConst>,
2753-
/// Is a macro placeholder
2753+
/// Is a macro placeholder.
27542754
pub is_placeholder: bool,
27552755
}
27562756

@@ -3024,19 +3024,19 @@ impl Item {
30243024
/// `extern` qualifier on a function item or function type.
30253025
#[derive(Clone, Copy, Encodable, Decodable, Debug)]
30263026
pub enum Extern {
3027-
/// No explicit extern keyword was used
3027+
/// No explicit extern keyword was used.
30283028
///
3029-
/// E.g. `fn foo() {}`
3029+
/// E.g. `fn foo() {}`.
30303030
None,
3031-
/// An explicit extern keyword was used, but with implicit ABI
3031+
/// An explicit extern keyword was used, but with implicit ABI.
30323032
///
3033-
/// E.g. `extern fn foo() {}`
3033+
/// E.g. `extern fn foo() {}`.
30343034
///
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`).
30363036
Implicit(Span),
3037-
/// An explicit extern keyword was used with an explicit ABI
3037+
/// An explicit extern keyword was used with an explicit ABI.
30383038
///
3039-
/// E.g. `extern "C" fn foo() {}`
3039+
/// E.g. `extern "C" fn foo() {}`.
30403040
Explicit(StrLit, Span),
30413041
}
30423042

@@ -3055,13 +3055,13 @@ impl Extern {
30553055
/// included in this struct (e.g., `async unsafe fn` or `const extern "C" fn`).
30563056
#[derive(Clone, Copy, Encodable, Decodable, Debug)]
30573057
pub struct FnHeader {
3058-
/// Whether this is `unsafe`, or has a default safety
3058+
/// Whether this is `unsafe`, or has a default safety.
30593059
pub safety: Safety,
30603060
/// Whether this is `async`, `gen`, or nothing.
30613061
pub coroutine_kind: Option<CoroutineKind>,
30623062
/// The `const` keyword, if any
30633063
pub constness: Const,
3064-
/// The `extern` keyword and corresponding ABI string, if any
3064+
/// The `extern` keyword and corresponding ABI string, if any.
30653065
pub ext: Extern,
30663066
}
30673067

@@ -3255,7 +3255,7 @@ pub enum ItemKind {
32553255
///
32563256
/// E.g., `trait Foo { .. }`, `trait Foo<T> { .. }` or `auto trait Foo {}`.
32573257
Trait(Box<Trait>),
3258-
/// Trait alias
3258+
/// Trait alias.
32593259
///
32603260
/// E.g., `trait Foo = Bar + Quux;`.
32613261
TraitAlias(Generics, GenericBounds),

0 commit comments

Comments
 (0)