Skip to content

Commit e2ae717

Browse files
committed
ast: tweak comments of Foreign/AssocItemKind
1 parent f06df16 commit e2ae717

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/libsyntax/ast.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,13 +2605,13 @@ pub type ForeignItem = Item<ForeignItemKind>;
26052605
/// An item within an `extern` block.
26062606
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
26072607
pub enum ForeignItemKind {
2608-
/// A foreign function.
2609-
Fn(FnSig, Generics, Option<P<Block>>),
2610-
/// A foreign static item (`static ext: u8`).
2608+
/// A static item (`static FOO: u8`).
26112609
Static(P<Ty>, Mutability),
2612-
/// A foreign type.
2610+
/// A function.
2611+
Fn(FnSig, Generics, Option<P<Block>>),
2612+
/// A type.
26132613
Ty,
2614-
/// A macro invocation.
2614+
/// A macro expanding to an item.
26152615
Macro(Mac),
26162616
}
26172617

@@ -2651,16 +2651,13 @@ pub struct AssocItem {
26512651
/// means "provided" and conversely `None` means "required".
26522652
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
26532653
pub enum AssocItemKind {
2654-
/// An associated constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`.
2655-
/// If `def` is parsed, then the associated constant is provided, and otherwise required.
2654+
/// A constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`.
2655+
/// If `def` is parsed, then the constant is provided, and otherwise required.
26562656
Const(P<Ty>, Option<P<Expr>>),
2657-
2658-
/// An associated function.
2657+
/// A function.
26592658
Fn(FnSig, Generics, Option<P<Block>>),
2660-
2661-
/// An associated type.
2659+
/// A type.
26622660
TyAlias(Generics, GenericBounds, Option<P<Ty>>),
2663-
2664-
/// A macro expanding to an associated item.
2661+
/// A macro expanding to an item.
26652662
Macro(Mac),
26662663
}

0 commit comments

Comments
 (0)