Add track_caller
to DefId::expect_local()
This commit is contained in:
parent
30f3860875
commit
2ed38cdbdd
@ -279,6 +279,7 @@ impl DefId {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
pub fn expect_local(self) -> LocalDefId {
|
||||
self.as_local().unwrap_or_else(|| panic!("DefId::expect_local: `{:?}` isn't local", self))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user