mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Merge #11112
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:
commit
ac3ea3e81c
5 changed files with 94 additions and 27 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue