1
Fork 0

Apply track_caller to closure on expect_non_local()

This commit is contained in:
Yuki Okushi 2022-05-10 20:17:38 +09:00
parent 16a0d03698
commit c7db4b08ff
No known key found for this signature in database
GPG key ID: 379CEEFDD63E5DD7
2 changed files with 5 additions and 1 deletions

View file

@ -671,7 +671,10 @@ impl<Id> Res<Id> {
#[track_caller]
pub fn expect_non_local<OtherId>(self) -> Res<OtherId> {
self.map_id(|_| panic!("unexpected `Res::Local`"))
self.map_id(
#[track_caller]
|_| panic!("unexpected `Res::Local`"),
)
}
pub fn macro_kind(self) -> Option<MacroKind> {