diff options
| author | kennytm <kennytm@gmail.com> | 2017-11-01 13:32:09 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 13:32:09 +0800 |
| commit | 59c9d03af8888f2d704c02f495a7734da4e86f2f (patch) | |
| tree | 5853b94b3d5231f5a1dfcb8e92cdb292530b01db /src/libsyntax/ast.rs | |
| parent | 07df45d363dcf7c7bd75ee4ed53a14a9709ef227 (diff) | |
| parent | 70479793ac9d7870d75d9c33f2776e95cff31d84 (diff) | |
| download | rust-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.rs | 4 |
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)`) /// |
