From 9faea2364dee4fbc9391ad233c570b70256ef002 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 13 Mar 2020 16:05:46 +0100 Subject: 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). --- crates/ra_hir_expand/src/hygiene.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_expand/src/hygiene.rs') 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 { } impl Hygiene { - pub fn new(db: &impl AstDatabase, file_id: HirFileId) -> Hygiene { + pub fn new(db: &dyn AstDatabase, file_id: HirFileId) -> Hygiene { let def_crate = match file_id.0 { HirFileIdRepr::FileId(_) => None, HirFileIdRepr::MacroFile(macro_file) => match macro_file.macro_call_id { -- cgit v1.2.3