mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
internal: intern TypeBound
s
Doesn't save much memory (~2 mb), but interning things is generally a good pattern to follow
This commit is contained in:
parent
05fc97e31b
commit
8ebb8d29e1
12 changed files with 49 additions and 27 deletions
|
@ -10,6 +10,7 @@ use std::{iter, sync::Arc};
|
|||
|
||||
use base_db::CrateId;
|
||||
use chalk_ir::{cast::Cast, fold::Shift, interner::HasInterner, Mutability, Safety};
|
||||
use hir_def::intern::Interned;
|
||||
use hir_def::{
|
||||
adt::StructKind,
|
||||
body::{Expander, LowerCtx},
|
||||
|
@ -843,7 +844,7 @@ impl<'a> TyLoweringContext<'a> {
|
|||
})
|
||||
}
|
||||
|
||||
fn lower_impl_trait(&self, bounds: &[TypeBound]) -> ReturnTypeImplTrait {
|
||||
fn lower_impl_trait(&self, bounds: &[Interned<TypeBound>]) -> ReturnTypeImplTrait {
|
||||
cov_mark::hit!(lower_rpit);
|
||||
let self_ty =
|
||||
TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)).intern(&Interner);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue