Skip to content

Commit 2ed38cd

Browse files
committed
Add track_caller to DefId::expect_local()
1 parent 30f3860 commit 2ed38cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_span/src/def_id.rs

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ impl DefId {
279279
}
280280

281281
#[inline]
282+
#[track_caller]
282283
pub fn expect_local(self) -> LocalDefId {
283284
self.as_local().unwrap_or_else(|| panic!("DefId::expect_local: `{:?}` isn't local", self))
284285
}

0 commit comments

Comments
 (0)