mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
add AstDatabase
This commit is contained in:
parent
8256dfdd71
commit
5af9e475f4
17 changed files with 186 additions and 98 deletions
|
@ -8,7 +8,7 @@ use std::sync::Arc;
|
|||
use ra_syntax::ast::{self, NameOwner, TypeParamsOwner, TypeBoundsOwner, DefaultTypeParamOwner};
|
||||
|
||||
use crate::{
|
||||
db::{ HirDatabase, DefDatabase},
|
||||
db::{HirDatabase, DefDatabase, AstDatabase},
|
||||
Name, AsName, Function, Struct, Union, Enum, Trait, TypeAlias, ImplBlock, Container, path::Path, type_ref::TypeRef, AdtDef
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ impl_froms!(GenericDef: Function, Struct, Union, Enum, Trait, TypeAlias, ImplBlo
|
|||
|
||||
impl GenericParams {
|
||||
pub(crate) fn generic_params_query(
|
||||
db: &impl DefDatabase,
|
||||
db: &(impl DefDatabase + AstDatabase),
|
||||
def: GenericDef,
|
||||
) -> Arc<GenericParams> {
|
||||
let mut generics = GenericParams::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue