diff options
author | Aleksey Kladov <[email protected]> | 2020-03-13 15:05:46 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-16 16:42:30 +0000 |
commit | 9faea2364dee4fbc9391ad233c570b70256ef002 (patch) | |
tree | 160af959553ce57fdfcbc0a6c79bafcc3611aeea /crates/ra_hir_expand/src/hygiene.rs | |
parent | 648df02953a6ebf87a5876668eceba208687e8a7 (diff) |
Use `dyn Trait` for working with databse
It improves compile time in `--release` mode quite a bit, it doesn't
really slow things down and, conceptually, it seems closer to what we
want the physical architecture to look like (we don't want to
monomorphise EVERYTHING in a single leaf crate).
Diffstat (limited to 'crates/ra_hir_expand/src/hygiene.rs')
-rw-r--r-- | crates/ra_hir_expand/src/hygiene.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/ra_hir_expand/src/hygiene.rs index cb554ae4b..dfbac494f 100644 --- a/crates/ra_hir_expand/src/hygiene.rs +++ b/crates/ra_hir_expand/src/hygiene.rs | |||
@@ -19,7 +19,7 @@ pub struct Hygiene { | |||
19 | } | 19 | } |
20 | 20 | ||
21 | impl Hygiene { | 21 | impl Hygiene { |
22 | pub fn new(db: &impl AstDatabase, file_id: HirFileId) -> Hygiene { | 22 | pub fn new(db: &dyn AstDatabase, file_id: HirFileId) -> Hygiene { |
23 | let def_crate = match file_id.0 { | 23 | let def_crate = match file_id.0 { |
24 | HirFileIdRepr::FileId(_) => None, | 24 | HirFileIdRepr::FileId(_) => None, |
25 | HirFileIdRepr::MacroFile(macro_file) => match macro_file.macro_call_id { | 25 | HirFileIdRepr::MacroFile(macro_file) => match macro_file.macro_call_id { |