diff options
| author | bors <bors@rust-lang.org> | 2013-12-08 19:26:23 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-12-08 19:26:23 -0800 |
| commit | 9f3be466e153f8f91bef1c6b1db26b674d6ae1bc (patch) | |
| tree | 102a0f093d04ef5478b9f08dfc562dd6971f3cee /src/libsyntax | |
| parent | 898d2c33b796a66f9276ed2988e0e60d0cf817c2 (diff) | |
| parent | 1f80ec4fec5661529e2f2f987dab0c241ec18a48 (diff) | |
| download | rust-9f3be466e153f8f91bef1c6b1db26b674d6ae1bc.tar.gz rust-9f3be466e153f8f91bef1c6b1db26b674d6ae1bc.zip | |
auto merge of #10866 : ktt3ja/rust/edit-doc, r=huonw
A comment that I previously added to ast::DefStruct is incorrect. Here's the modification.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 52613ba01a1..e64e1615041 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -254,9 +254,14 @@ pub enum Def { NodeId, // expr node that creates the closure NodeId), // id for the block/body of the closure expr - /// Note that if it's a tuple struct's definition, the node id - /// of the DefId refers to the struct_def.ctor_id (whereas normally it - /// refers to the item definition's id). + /// Note that if it's a tuple struct's definition, the node id of the DefId + /// may either refer to the item definition's id or the struct_def.ctor_id. + /// + /// The cases that I have encountered so far are (this is not exhaustive): + /// - If it's a ty_path referring to some tuple struct, then DefMap maps + /// it to a def whose id is the item definition's id. + /// - If it's an ExprPath referring to some tuple struct, then DefMap maps + /// it to a def whose id is the struct_def.ctor_id. DefStruct(DefId), DefTyParamBinder(NodeId), /* struct, impl or trait with ty params */ DefRegion(NodeId), |
