@@ -1390,7 +1390,7 @@ pub struct StructExpr {
1390
1390
// Adding a new variant? Please update `test_expr` in `tests/ui/macros/stringify.rs`.
1391
1391
#[ derive( Clone , Encodable , Decodable , Debug ) ]
1392
1392
pub enum ExprKind {
1393
- /// An array (`[a, b, c, d]`)
1393
+ /// An array (e.g, `[a, b, c, d]`).
1394
1394
Array ( ThinVec < P < Expr > > ) ,
1395
1395
/// Allow anonymous constants from an inline `const` block
1396
1396
ConstBlock ( AnonConst ) ,
@@ -1401,7 +1401,7 @@ pub enum ExprKind {
1401
1401
/// This also represents calling the constructor of
1402
1402
/// tuple-like ADTs such as tuple structs and enum variants.
1403
1403
Call ( P < Expr > , ThinVec < P < Expr > > ) ,
1404
- /// A method call (e.g. `x.foo::<Bar, Baz>(a, b, c)`).
1404
+ /// A method call (e.g., `x.foo::<Bar, Baz>(a, b, c)`).
1405
1405
MethodCall ( Box < MethodCall > ) ,
1406
1406
/// A tuple (e.g., `(a, b, c, d)`).
1407
1407
Tup ( ThinVec < P < Expr > > ) ,
@@ -1413,7 +1413,10 @@ pub enum ExprKind {
1413
1413
Lit ( token:: Lit ) ,
1414
1414
/// A cast (e.g., `foo as f64`).
1415
1415
Cast ( P < Expr > , P < Ty > ) ,
1416
- /// A type ascription (e.g., `42: usize`).
1416
+ /// A type ascription (e.g., `builtin # type_ascribe(42, usize)`).
1417
+ ///
1418
+ /// Usually not written directly in user code but
1419
+ /// indirectly via the macro `type_ascribe!(...)`.
1417
1420
Type ( P < Expr > , P < Ty > ) ,
1418
1421
/// A `let pat = expr` expression that is only semantically allowed in the condition
1419
1422
/// of `if` / `while` expressions. (e.g., `if let 0 = x { .. }`).
@@ -1488,7 +1491,10 @@ pub enum ExprKind {
1488
1491
/// Output of the `asm!()` macro.
1489
1492
InlineAsm ( P < InlineAsm > ) ,
1490
1493
1491
- /// Output of the `offset_of!()` macro.
1494
+ /// An `offset_of` expression (e.g., `builtin # offset_of(Struct, field)`).
1495
+ ///
1496
+ /// Usually not written directly in user code but
1497
+ /// indirectly via the macro `core::mem::offset_of!(...)`.
1492
1498
OffsetOf ( P < Ty > , P < [ Ident ] > ) ,
1493
1499
1494
1500
/// A macro invocation; pre-expansion.
0 commit comments