diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-02 10:32:26 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-02 10:32:26 +0100 |
commit | 82cf27b5fc91a4125315d28b8a3c86e5fa7be26d (patch) | |
tree | c6f5e240d385fd33f25a70d20b8244a721202264 /crates/ra_hir/src/generics.rs | |
parent | 8256dfdd713451cbe54ee61a176b79f1d1bab589 (diff) | |
parent | 5af9e475f4acce54f8383ed22febc412cf2541d0 (diff) |
Merge #1362
1362: Introduce AST database r=matklad a=matklad
The idea here is to separate fragile bits which look into the syntax directly from robust bits which are safe across reparses. This uses the new `salsa::requires` featue
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/generics.rs')
-rw-r--r-- | crates/ra_hir/src/generics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index 8effbbe35..b6c5e18d3 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs | |||
@@ -8,7 +8,7 @@ use std::sync::Arc; | |||
8 | use ra_syntax::ast::{self, NameOwner, TypeParamsOwner, TypeBoundsOwner, DefaultTypeParamOwner}; | 8 | use ra_syntax::ast::{self, NameOwner, TypeParamsOwner, TypeBoundsOwner, DefaultTypeParamOwner}; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | db::{ HirDatabase, DefDatabase}, | 11 | db::{HirDatabase, DefDatabase, AstDatabase}, |
12 | Name, AsName, Function, Struct, Union, Enum, Trait, TypeAlias, ImplBlock, Container, path::Path, type_ref::TypeRef, AdtDef | 12 | Name, AsName, Function, Struct, Union, Enum, Trait, TypeAlias, ImplBlock, Container, path::Path, type_ref::TypeRef, AdtDef |
13 | }; | 13 | }; |
14 | 14 | ||
@@ -52,7 +52,7 @@ impl_froms!(GenericDef: Function, Struct, Union, Enum, Trait, TypeAlias, ImplBlo | |||
52 | 52 | ||
53 | impl GenericParams { | 53 | impl GenericParams { |
54 | pub(crate) fn generic_params_query( | 54 | pub(crate) fn generic_params_query( |
55 | db: &impl DefDatabase, | 55 | db: &(impl DefDatabase + AstDatabase), |
56 | def: GenericDef, | 56 | def: GenericDef, |
57 | ) -> Arc<GenericParams> { | 57 | ) -> Arc<GenericParams> { |
58 | let mut generics = GenericParams::default(); | 58 | let mut generics = GenericParams::default(); |