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:
commit
59c9d03af8
@ -1054,7 +1054,9 @@ pub enum Expr_ {
|
||||
/// A function call
|
||||
///
|
||||
/// The first field resolves to the function itself (usually an `ExprPath`),
|
||||
/// 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.
|
||||
ExprCall(P<Expr>, HirVec<Expr>),
|
||||
/// A method call (`x.foo::<'static, Bar, Baz>(a, b, c, d)`)
|
||||
///
|
||||
|
@ -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)`)
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user