File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -254,9 +254,14 @@ pub enum Def {
254
254
NodeId , // expr node that creates the closure
255
255
NodeId ) , // id for the block/body of the closure expr
256
256
257
- /// Note that if it's a tuple struct's definition, the node id
258
- /// of the DefId refers to the struct_def.ctor_id (whereas normally it
259
- /// refers to the item definition's id).
257
+ /// Note that if it's a tuple struct's definition, the node id of the DefId
258
+ /// may either refer to the item definition's id or the struct_def.ctor_id.
259
+ ///
260
+ /// The cases that I have encountered so far are (this is not exhaustive):
261
+ /// - If it's a ty_path referring to some tuple struct, then DefMap maps
262
+ /// it to a def whose id is the item definition's id.
263
+ /// - If it's an ExprPath referring to some tuple struct, then DefMap maps
264
+ /// it to a def whose id is the struct_def.ctor_id.
260
265
DefStruct ( DefId ) ,
261
266
DefTyParamBinder ( NodeId ) , /* struct, impl or trait with ty params */
262
267
DefRegion ( NodeId ) ,
You can’t perform that action at this time.
0 commit comments