11112: Evaluate constants in array repeat expression r=HKalbasi a=HKalbasi

cc #8655 

Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
This commit is contained in:
bors[bot] 2022-01-04 21:51:37 +00:00 committed by GitHub
commit ac3ea3e81c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 94 additions and 27 deletions

View file

@ -1540,11 +1540,11 @@ impl Const {
let infer = infer.as_ref();
let result = eval_const(
root,
ConstEvalCtx {
&mut ConstEvalCtx {
exprs: &body.exprs,
pats: &body.pats,
local_data: HashMap::default(),
infer,
infer: &mut |x| infer[x].clone(),
},
);
result