Rollup merge of #114772 - fee1-dead-contrib:typed-did, r=b-naber
Add `{Local}ModDefId` to more strongly type DefIds`
Based on #110862 by `@Nilstrieb`
This commit is contained in:
@@ -355,8 +355,8 @@ impl TyCtxt<'_> {
|
||||
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
pub fn local_parent(self, id: LocalDefId) -> LocalDefId {
|
||||
self.parent(id.to_def_id()).expect_local()
|
||||
pub fn local_parent(self, id: impl Into<LocalDefId>) -> LocalDefId {
|
||||
self.parent(id.into().to_def_id()).expect_local()
|
||||
}
|
||||
|
||||
pub fn is_descendant_of(self, mut descendant: DefId, ancestor: DefId) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user