mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
Fix comment on ast::DefStruct
This commit is contained in:
parent
a6310f6ad3
commit
1f80ec4fec
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user