mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Add enum, reference, array and slice to render_const_scalar
This commit is contained in:
parent
4458e7f190
commit
f9e3b180b7
9 changed files with 561 additions and 115 deletions
|
@ -1855,7 +1855,7 @@ pub fn lower_to_mir(
|
|||
}
|
||||
let mut ctx = MirLowerCtx::new(db, owner, body, infer);
|
||||
// 0 is return local
|
||||
ctx.result.locals.alloc(Local { ty: infer[root_expr].clone() });
|
||||
ctx.result.locals.alloc(Local { ty: ctx.expr_ty_after_adjustments(root_expr) });
|
||||
let binding_picker = |b: BindingId| {
|
||||
if root_expr == body.body_expr {
|
||||
body[b].owner.is_none()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue