We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc29b75 commit bd9bab8Copy full SHA for bd9bab8
crates/ide_assists/src/utils.rs
@@ -310,9 +310,9 @@ fn calc_depth(pat: &ast::Pat, depth: usize) -> usize {
310
| ast::Pat::RefPat(_)
311
| ast::Pat::SlicePat(_)
312
| ast::Pat::TuplePat(_)
313
- | ast::Pat::ConstBlockPat(_) => 1,
+ | ast::Pat::ConstBlockPat(_) => depth,
314
315
- // TODO: Other patterns may also be nested. Currently it simply supports only `TupleStructPat`
+ // FIXME: Other patterns may also be nested. Currently it simply supports only `TupleStructPat`
316
ast::Pat::TupleStructPat(pat) => {
317
let mut max_depth = depth;
318
for p in pat.fields() {
0 commit comments