@@ -31,8 +31,8 @@ use syntax::{SyntaxNodePtr, TextRange};
31
31
use triomphe:: Arc ;
32
32
33
33
use crate :: {
34
- CallableDefId , ClosureId , ComplexMemoryMap , Const , ConstData , ConstScalar , FnDefId , Interner ,
35
- MemoryMap , Substitution , ToChalk , TraitEnvironment , Ty , TyBuilder , TyExt , TyKind ,
34
+ AliasTy , CallableDefId , ClosureId , ComplexMemoryMap , Const , ConstData , ConstScalar , FnDefId ,
35
+ Interner , MemoryMap , Substitution , ToChalk , TraitEnvironment , Ty , TyBuilder , TyExt , TyKind ,
36
36
consteval:: { ConstEvalError , intern_const_scalar, try_const_usize} ,
37
37
db:: { HirDatabase , InternedClosure } ,
38
38
display:: { ClosureStyle , DisplayTarget , HirDisplay } ,
@@ -2195,7 +2195,7 @@ impl Evaluator<'_> {
2195
2195
}
2196
2196
}
2197
2197
}
2198
- chalk_ir :: TyKind :: Array ( inner, len) => {
2198
+ TyKind :: Array ( inner, len) => {
2199
2199
let len = match try_const_usize ( this. db , len) {
2200
2200
Some ( it) => it as usize ,
2201
2201
None => not_supported ! ( "non evaluatable array len in patching addresses" ) ,
@@ -2213,7 +2213,7 @@ impl Evaluator<'_> {
2213
2213
) ?;
2214
2214
}
2215
2215
}
2216
- chalk_ir :: TyKind :: Tuple ( _, subst) => {
2216
+ TyKind :: Tuple ( _, subst) => {
2217
2217
let layout = this. layout ( ty) ?;
2218
2218
for ( id, ty) in subst. iter ( Interner ) . enumerate ( ) {
2219
2219
let ty = ty. assert_ty_ref ( Interner ) ; // Tuple only has type argument
@@ -2229,7 +2229,7 @@ impl Evaluator<'_> {
2229
2229
) ?;
2230
2230
}
2231
2231
}
2232
- chalk_ir :: TyKind :: Adt ( adt, subst) => match adt. 0 {
2232
+ TyKind :: Adt ( adt, subst) => match adt. 0 {
2233
2233
AdtId :: StructId ( s) => {
2234
2234
let data = s. fields ( this. db ) ;
2235
2235
let layout = this. layout ( ty) ?;
@@ -2280,6 +2280,10 @@ impl Evaluator<'_> {
2280
2280
}
2281
2281
AdtId :: UnionId ( _) => ( ) ,
2282
2282
} ,
2283
+ TyKind :: Alias ( AliasTy :: Projection ( proj) ) => {
2284
+ let ty = this. db . normalize_projection ( proj. clone ( ) , this. trait_env . clone ( ) ) ;
2285
+ rec ( this, bytes, & ty, locals, mm, stack_depth_limit - 1 ) ?;
2286
+ }
2283
2287
_ => ( ) ,
2284
2288
}
2285
2289
Ok ( ( ) )
0 commit comments