mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Eagerly lower enum variants in CrateDefMap construction
This commit is contained in:
parent
9d8889cdfc
commit
d80d2fcae0
49 changed files with 553 additions and 593 deletions
|
@ -18,10 +18,7 @@ pub(crate) struct Trace<T, V> {
|
|||
}
|
||||
|
||||
impl<T, V> Trace<T, V> {
|
||||
pub(crate) fn new_for_arena() -> Trace<T, V> {
|
||||
Trace { arena: Some(Arena::default()), map: None, len: 0 }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn new_for_map() -> Trace<T, V> {
|
||||
Trace { arena: None, map: Some(ArenaMap::default()), len: 0 }
|
||||
}
|
||||
|
@ -41,6 +38,7 @@ impl<T, V> Trace<T, V> {
|
|||
id
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn into_arena(mut self) -> Arena<T> {
|
||||
self.arena.take().unwrap()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue