rustc: Remove local variable IDs from Export
s
Local variables can never be exported.
This commit is contained in:
parent
b69fe57261
commit
294510e1bb
19 changed files with 71 additions and 68 deletions
|
@ -598,6 +598,11 @@ impl<Id> Res<Id> {
|
|||
}
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub fn expect_non_local<OtherId>(self) -> Res<OtherId> {
|
||||
self.map_id(|_| panic!("unexpected `Res::Local`"))
|
||||
}
|
||||
|
||||
pub fn macro_kind(self) -> Option<MacroKind> {
|
||||
match self {
|
||||
Res::Def(DefKind::Macro(kind), _) => Some(kind),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue