about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-02-13 18:15:58 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-02-15 18:00:01 +0100
commite2ae717265c4597d605cf5981a6e557516ccb0c8 (patch)
tree92ed102aa8023142504f456a449302bf2b0ae070 /src/libsyntax
parentf06df1629e1144be6a217754303a6585699e0728 (diff)
downloadrust-e2ae717265c4597d605cf5981a6e557516ccb0c8.tar.gz
rust-e2ae717265c4597d605cf5981a6e557516ccb0c8.zip
ast: tweak comments of Foreign/AssocItemKind
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs23
1 files changed, 10 insertions, 13 deletions
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<ForeignItemKind>;
 /// An item within an `extern` block.
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
 pub enum ForeignItemKind {
-    /// A foreign function.
-    Fn(FnSig, Generics, Option<P<Block>>),
-    /// A foreign static item (`static ext: u8`).
+    /// A static item (`static FOO: u8`).
     Static(P<Ty>, Mutability),
-    /// A foreign type.
+    /// A function.
+    Fn(FnSig, Generics, Option<P<Block>>),
+    /// 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<Ty>, Option<P<Expr>>),
-
-    /// An associated function.
+    /// A function.
     Fn(FnSig, Generics, Option<P<Block>>),
-
-    /// An associated type.
+    /// A type.
     TyAlias(Generics, GenericBounds, Option<P<Ty>>),
-
-    /// A macro expanding to an associated item.
+    /// A macro expanding to an item.
     Macro(Mac),
 }