about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-11-01 13:32:09 +0800
committerGitHub <noreply@github.com>2017-11-01 13:32:09 +0800
commit59c9d03af8888f2d704c02f495a7734da4e86f2f (patch)
tree5853b94b3d5231f5a1dfcb8e92cdb292530b01db /src/libsyntax/ast.rs
parent07df45d363dcf7c7bd75ee4ed53a14a9709ef227 (diff)
parent70479793ac9d7870d75d9c33f2776e95cff31d84 (diff)
downloadrust-59c9d03af8888f2d704c02f495a7734da4e86f2f.tar.gz
rust-59c9d03af8888f2d704c02f495a7734da4e86f2f.zip
Rollup merge of #45579 - leodasvacas:document-that-call-can-be-adt-constructor, r=estebank
Document that call expressions also represent ADT constructors.

This is a rather obscure part of the language.
Diffstat (limited to 'src/libsyntax/ast.rs')
-rw-r--r--src/libsyntax/ast.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index d3995d95792..be0af8052eb 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -901,7 +901,9 @@ pub enum ExprKind {
     /// A function call
     ///
     /// The first field resolves to the function itself,
-    /// and the second field is the list of arguments
+    /// and the second field is the list of arguments.
+    /// This also represents calling the constructor of
+    /// tuple-like ADTs such as tuple structs and enum variants.
     Call(P<Expr>, Vec<P<Expr>>),
     /// A method call (`x.foo::<'static, Bar, Baz>(a, b, c, d)`)
     ///