From e2ae717265c4597d605cf5981a6e557516ccb0c8 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 13 Feb 2020 18:15:58 +0100 Subject: ast: tweak comments of Foreign/AssocItemKind --- src/libsyntax/ast.rs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 2eab688fd9d..af0195ffc61 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -2605,13 +2605,13 @@ pub type ForeignItem = Item; /// An item within an `extern` block. #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum ForeignItemKind { - /// A foreign function. - Fn(FnSig, Generics, Option>), - /// A foreign static item (`static ext: u8`). + /// A static item (`static FOO: u8`). Static(P, Mutability), - /// A foreign type. + /// A function. + Fn(FnSig, Generics, Option>), + /// A type. Ty, - /// A macro invocation. + /// A macro expanding to an item. Macro(Mac), } @@ -2651,16 +2651,13 @@ pub struct AssocItem { /// means "provided" and conversely `None` means "required". #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum AssocItemKind { - /// An associated constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`. - /// If `def` is parsed, then the associated constant is provided, and otherwise required. + /// A constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`. + /// If `def` is parsed, then the constant is provided, and otherwise required. Const(P, Option>), - - /// An associated function. + /// A function. Fn(FnSig, Generics, Option>), - - /// An associated type. + /// A type. TyAlias(Generics, GenericBounds, Option>), - - /// A macro expanding to an associated item. + /// A macro expanding to an item. Macro(Mac), } -- cgit 1.4.1-3-g733a5