mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Format let-else
This commit is contained in:
parent
28fcd1bdd7
commit
69cd3c30ac
38 changed files with 572 additions and 306 deletions
|
@ -636,7 +636,8 @@ fn render_const_scalar(
|
|||
}
|
||||
hir_def::AdtId::EnumId(e) => {
|
||||
let Some((var_id, var_layout)) =
|
||||
detect_variant_from_bytes(&layout, f.db, krate, b, e) else {
|
||||
detect_variant_from_bytes(&layout, f.db, krate, b, e)
|
||||
else {
|
||||
return f.write_str("<failed-to-detect-variant>");
|
||||
};
|
||||
let data = &f.db.enum_data(e).variants[var_id];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue