File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -445,7 +445,37 @@ impl DefKind {
445445 /// type-checking context, i.e. closure, coroutine or inline const.
446446 #[ inline]
447447 pub fn is_typeck_child ( self ) -> bool {
448- matches ! ( self , DefKind :: Closure | DefKind :: InlineConst | DefKind :: SyntheticCoroutineBody )
448+ match self {
449+ DefKind :: Closure | DefKind :: InlineConst | DefKind :: SyntheticCoroutineBody => true ,
450+ DefKind :: Mod
451+ | DefKind :: Struct
452+ | DefKind :: Union
453+ | DefKind :: Enum
454+ | DefKind :: Variant
455+ | DefKind :: Trait
456+ | DefKind :: TyAlias
457+ | DefKind :: ForeignTy
458+ | DefKind :: TraitAlias
459+ | DefKind :: AssocTy
460+ | DefKind :: TyParam
461+ | DefKind :: Fn
462+ | DefKind :: Const
463+ | DefKind :: ConstParam
464+ | DefKind :: Static { .. }
465+ | DefKind :: Ctor ( _, _)
466+ | DefKind :: AssocFn
467+ | DefKind :: AssocConst
468+ | DefKind :: Macro ( _)
469+ | DefKind :: ExternCrate
470+ | DefKind :: Use
471+ | DefKind :: ForeignMod
472+ | DefKind :: AnonConst
473+ | DefKind :: OpaqueTy
474+ | DefKind :: Field
475+ | DefKind :: LifetimeParam
476+ | DefKind :: GlobalAsm
477+ | DefKind :: Impl { .. } => false ,
478+ }
449479 }
450480}
451481
You can’t perform that action at this time.
0 commit comments