Add track_caller
to DefId::expect_local()
This commit is contained in:
parent
30f3860875
commit
2ed38cdbdd
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue