@@ -73,7 +73,7 @@ pub enum Def {
73
73
ConstParam ( DefId ) ,
74
74
Static ( DefId , bool /* is_mutbl */ ) ,
75
75
/// `DefId` refers to the struct or enum variant's constructor.
76
- Ctor ( CtorOf , DefId , CtorKind ) ,
76
+ Ctor ( DefId , CtorOf , CtorKind ) ,
77
77
SelfCtor ( DefId /* impl */ ) , // `DefId` refers to the impl
78
78
Method ( DefId ) ,
79
79
AssociatedConst ( DefId ) ,
@@ -276,7 +276,7 @@ impl Def {
276
276
pub fn opt_def_id ( & self ) -> Option < DefId > {
277
277
match * self {
278
278
Def :: Fn ( id) | Def :: Mod ( id) | Def :: Static ( id, _) |
279
- Def :: Variant ( id) | Def :: Ctor ( _ , id, ..) | Def :: Enum ( id) |
279
+ Def :: Variant ( id) | Def :: Ctor ( id, ..) | Def :: Enum ( id) |
280
280
Def :: TyAlias ( id) | Def :: TraitAlias ( id) |
281
281
Def :: AssociatedTy ( id) | Def :: TyParam ( id) | Def :: ConstParam ( id) | Def :: Struct ( id) |
282
282
Def :: Union ( id) | Def :: Trait ( id) | Def :: Method ( id) | Def :: Const ( id) |
@@ -315,13 +315,13 @@ impl Def {
315
315
Def :: Static ( ..) => "static" ,
316
316
Def :: Enum ( ..) => "enum" ,
317
317
Def :: Variant ( ..) => "variant" ,
318
- Def :: Ctor ( CtorOf :: Variant , _ , CtorKind :: Fn ) => "tuple variant" ,
319
- Def :: Ctor ( CtorOf :: Variant , _ , CtorKind :: Const ) => "unit variant" ,
320
- Def :: Ctor ( CtorOf :: Variant , _ , CtorKind :: Fictive ) => "struct variant" ,
318
+ Def :: Ctor ( _ , CtorOf :: Variant , CtorKind :: Fn ) => "tuple variant" ,
319
+ Def :: Ctor ( _ , CtorOf :: Variant , CtorKind :: Const ) => "unit variant" ,
320
+ Def :: Ctor ( _ , CtorOf :: Variant , CtorKind :: Fictive ) => "struct variant" ,
321
321
Def :: Struct ( ..) => "struct" ,
322
- Def :: Ctor ( CtorOf :: Struct , _ , CtorKind :: Fn ) => "tuple struct" ,
323
- Def :: Ctor ( CtorOf :: Struct , _ , CtorKind :: Const ) => "unit struct" ,
324
- Def :: Ctor ( CtorOf :: Struct , _ , CtorKind :: Fictive ) =>
322
+ Def :: Ctor ( _ , CtorOf :: Struct , CtorKind :: Fn ) => "tuple struct" ,
323
+ Def :: Ctor ( _ , CtorOf :: Struct , CtorKind :: Const ) => "unit struct" ,
324
+ Def :: Ctor ( _ , CtorOf :: Struct , CtorKind :: Fictive ) =>
325
325
bug ! ( "impossible struct constructor" ) ,
326
326
Def :: Existential ( ..) => "existential type" ,
327
327
Def :: TyAlias ( ..) => "type alias" ,
0 commit comments