summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorleonardo.yvens <leoyvens@gmail.com>2017-10-27 16:27:59 -0200
committerleonardo.yvens <leoyvens@gmail.com>2017-10-27 16:27:59 -0200
commit70479793ac9d7870d75d9c33f2776e95cff31d84 (patch)
tree76147c3901789bdb1eb4934b04ec996aa04e90d0 /src/libsyntax
parentbed9a85c40f98ab8f4445b66d285d4108de9ad21 (diff)
downloadrust-70479793ac9d7870d75d9c33f2776e95cff31d84.tar.gz
rust-70479793ac9d7870d75d9c33f2776e95cff31d84.zip
Document that call expressions also represent ADT constructors.
This is a rather obscure part of the language.
Diffstat (limited to 'src/libsyntax')
-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 090fc193b38..52b50a81e79 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)`)
     ///