diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-05-06 07:28:06 +0900 |
|---|---|---|
| committer | Yuki Okushi <jtitor@2k36.org> | 2022-05-06 07:28:06 +0900 |
| commit | 2ed38cdbdd3670790aaf3d48ab2bbdf10dad290b (patch) | |
| tree | ff287d3ea8a336668e5a894ed9019fec4d4dc5fb /compiler/rustc_span | |
| parent | 30f386087564243ab88a93c984c265290a31580b (diff) | |
| download | rust-2ed38cdbdd3670790aaf3d48ab2bbdf10dad290b.tar.gz rust-2ed38cdbdd3670790aaf3d48ab2bbdf10dad290b.zip | |
Add `track_caller` to `DefId::expect_local()`
Diffstat (limited to 'compiler/rustc_span')
| -rw-r--r-- | compiler/rustc_span/src/def_id.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/def_id.rs b/compiler/rustc_span/src/def_id.rs index d5f806308cf..6b529d5e083 100644 --- a/compiler/rustc_span/src/def_id.rs +++ b/compiler/rustc_span/src/def_id.rs @@ -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)) } |
