mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Semantic getter
This commit is contained in:
parent
6c7526d308
commit
98676efdc5
9 changed files with 401 additions and 63 deletions
|
@ -97,6 +97,10 @@ impl TyBuilder<()> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn slice(argument: Ty) -> Ty {
|
||||
TyKind::Slice(argument).intern(&Interner)
|
||||
}
|
||||
|
||||
pub fn type_params_subst(db: &dyn HirDatabase, def: impl Into<GenericDefId>) -> Substitution {
|
||||
let params = generics(db.upcast(), def.into());
|
||||
params.type_params_subst(db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue