don't cache parses twice

Before this commit, `Parse`s for original file ended up two times in
salsa's db: first, when we parse original file, and second, when we
parse macro or a file.

Given that parse trees are the worst ofenders in terms of memory, it
makes sense to make sure we store them only once.
This commit is contained in:
Aleksey Kladov 2019-06-02 20:15:10 +03:00
parent b40c6de8a6
commit 8b7f58976b
5 changed files with 61 additions and 33 deletions

View file

@ -60,7 +60,7 @@ pub use self::{
path::{Path, PathKind},
name::Name,
source_id::{AstIdMap, ErasedFileAstId},
ids::{HirFileId, MacroDefId, MacroCallId, MacroCallLoc},
ids::{HirFileId, MacroDefId, MacroCallId, MacroCallLoc, MacroFile},
nameres::{PerNs, Namespace, ImportId},
ty::{Ty, ApplicationTy, TypeCtor, TraitRef, Substs, display::HirDisplay, CallableDef},
impl_block::{ImplBlock, ImplItem},