Skip to content

Fix comment on ast::DefStruct #10866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/libsyntax/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down