diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-16 16:42:58 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-16 16:42:58 +0000 |
commit | adcc89137d3feea8f19fad461bbde6f4bce048e5 (patch) | |
tree | 160af959553ce57fdfcbc0a6c79bafcc3611aeea /crates/ra_hir_expand/src/db.rs | |
parent | 648df02953a6ebf87a5876668eceba208687e8a7 (diff) | |
parent | 9faea2364dee4fbc9391ad233c570b70256ef002 (diff) |
Merge #3584
3584: Switch to dynamic dispatch r=matklad a=matklad
Benches are in https://github.com/rust-analyzer/rust-analyzer/issues/1987#issuecomment-598807185
TL;DR:
* 33% faster release build
* slightly worse/same perf
* no changes for debug build
* slightly smaller binary
cc @flodiebold I genuinely don't know if it is a good idea or not.
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_expand/src/db.rs')
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index 29dde3d80..c3e1c68b7 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs | |||
@@ -77,7 +77,7 @@ pub trait AstDatabase: SourceDatabase { | |||
77 | /// token. The `token_to_map` mapped down into the expansion, with the mapped | 77 | /// token. The `token_to_map` mapped down into the expansion, with the mapped |
78 | /// token returned. | 78 | /// token returned. |
79 | pub fn expand_hypothetical( | 79 | pub fn expand_hypothetical( |
80 | db: &impl AstDatabase, | 80 | db: &dyn AstDatabase, |
81 | actual_macro_call: MacroCallId, | 81 | actual_macro_call: MacroCallId, |
82 | hypothetical_args: &ra_syntax::ast::TokenTree, | 82 | hypothetical_args: &ra_syntax::ast::TokenTree, |
83 | token_to_map: ra_syntax::SyntaxToken, | 83 | token_to_map: ra_syntax::SyntaxToken, |