Skip to content

Commit

Permalink
Fix comment on ast::DefStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
ktt3ja committed Dec 9, 2013
1 parent a6310f6 commit 1f80ec4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/libsyntax/ast.rs
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

5 comments on commit 1f80ec4

@bors
Copy link
Contributor

@bors bors commented on 1f80ec4 Dec 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at ktt3ja@1f80ec4

@bors
Copy link
Contributor

@bors bors commented on 1f80ec4 Dec 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging ktt3ja/rust/edit-doc = 1f80ec4 into auto

@bors
Copy link
Contributor

@bors bors commented on 1f80ec4 Dec 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ktt3ja/rust/edit-doc = 1f80ec4 merged ok, testing candidate = 9f3be46

@bors
Copy link
Contributor

@bors bors commented on 1f80ec4 Dec 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 1f80ec4 Dec 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9f3be46

Please sign in to comment.