mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Evaluate constants in array repeat expression
This commit is contained in:
parent
7b7a1ed062
commit
75c2acae6e
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