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.
This commit is contained in:
kennytm
2017-11-01 13:32:09 +08:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -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)`)
///