mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
More cleanups / module docs
This commit is contained in:
parent
8a2c482082
commit
fbe98047d4
6 changed files with 12 additions and 10 deletions
|
@ -126,14 +126,14 @@ pub fn param_idx(db: &dyn HirDatabase, id: TypeParamId) -> Option<usize> {
|
|||
generics(db.upcast(), id.parent).param_idx(id)
|
||||
}
|
||||
|
||||
pub fn wrap_empty_binders<T>(value: T) -> Binders<T>
|
||||
pub(crate) fn wrap_empty_binders<T>(value: T) -> Binders<T>
|
||||
where
|
||||
T: Fold<Interner, Result = T> + HasInterner<Interner = Interner>,
|
||||
{
|
||||
Binders::empty(&Interner, value.shifted_in_from(&Interner, DebruijnIndex::ONE))
|
||||
}
|
||||
|
||||
pub fn make_only_type_binders<T: HasInterner<Interner = Interner>>(
|
||||
pub(crate) fn make_only_type_binders<T: HasInterner<Interner = Interner>>(
|
||||
num_vars: usize,
|
||||
value: T,
|
||||
) -> Binders<T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue