Add of_trait
to DefKind::Impl.
This commit is contained in:
parent
9bb6e60d1f
commit
03dff82d59
28 changed files with 68 additions and 64 deletions
|
@ -17,7 +17,8 @@ pub fn is_unstable_const_fn(tcx: TyCtxt<'_>, def_id: DefId) -> Option<Symbol> {
|
|||
|
||||
pub fn is_parent_const_impl_raw(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
|
||||
let parent_id = tcx.local_parent(def_id);
|
||||
tcx.def_kind(parent_id) == DefKind::Impl && tcx.constness(parent_id) == hir::Constness::Const
|
||||
matches!(tcx.def_kind(parent_id), DefKind::Impl { .. })
|
||||
&& tcx.constness(parent_id) == hir::Constness::Const
|
||||
}
|
||||
|
||||
/// Checks whether an item is considered to be `const`. If it is a constructor, it is const. If
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue