rust-analyzer/crates
A4-Tacks f34e9ca8d3
Fix panic !self.data().mutable for destructure_struct_binding
When the reference type does not require adding a dereference or parentheses, it will panic

Example
---

```rust
struct Foo { bar: i32, baz: i32 }

fn main() {
    let $0foo = &Foo { bar: 1, baz: 2 };
    let _ = &foo.bar;
}
```

**Before this PR**:

Panic:
```
assertion failed: !self.data().mutable
```

**After this PR**:

```rust
struct Foo { bar: i32, baz: i32 }

fn main() {
    let Foo { bar, baz } = &Foo { bar: 1, baz: 2 };
    let _ = bar;
}
```
2025-09-20 17:52:01 +08:00
..
base-db Expand target info to include the architecture 2025-09-09 13:47:26 +03:00
cfg cargo clippy --fix 2025-07-31 10:55:10 +02:00
edition
hir Merge pull request #20664 from ChayimFriedman2/coerce-ns 2025-09-18 00:19:30 +00:00
hir-def Merge pull request #20664 from ChayimFriedman2/coerce-ns 2025-09-18 00:19:30 +00:00
hir-expand When renaming a parameter to self, change callers to use method call syntax 2025-08-02 21:39:22 +03:00
hir-ty Merge pull request #20697 from Oblarg/fix-negative-const-generic-literals 2025-09-19 14:13:54 +00:00
ide fix negative const generic integer literals 2025-09-18 18:55:13 -04:00
ide-assists Fix panic !self.data().mutable for destructure_struct_binding 2025-09-20 17:52:01 +08:00
ide-completion Merge pull request #20664 from ChayimFriedman2/coerce-ns 2025-09-18 00:19:30 +00:00
ide-db Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzus 2025-09-16 07:28:47 +00:00
ide-diagnostics Merge pull request #20664 from ChayimFriedman2/coerce-ns 2025-09-18 00:19:30 +00:00
ide-ssr Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzus 2025-09-16 07:28:47 +00:00
intern Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics 2025-09-15 18:56:17 +03:00
load-cargo cargo clippy --fix 2025-07-31 10:55:10 +02:00
mbe cargo clippy --fix 2025-07-31 10:55:10 +02:00
parser Auto-attach database in Analysis calls 2025-08-18 09:52:23 +02:00
paths Don't run doctests 2025-06-23 00:50:22 +03:00
proc-macro-api Add version command to proc-macro-srv 2025-07-31 10:10:50 +02:00
proc-macro-srv Reorganize proc-macro-srv 2025-07-31 09:55:07 +02:00
proc-macro-srv-cli Add version command to proc-macro-srv 2025-07-31 10:10:50 +02:00
profile Implement next trait solver 2025-08-09 16:08:58 +00:00
project-model Expand target info to include the architecture 2025-09-09 13:47:26 +03:00
query-group-macro Implement next trait solver 2025-08-09 16:08:58 +00:00
rust-analyzer Merge pull request #20664 from ChayimFriedman2/coerce-ns 2025-09-18 00:19:30 +00:00
span Merge Trait and TraitAlias handling 2025-08-13 15:28:08 +08:00
stdx Don't run doctests 2025-06-23 00:50:22 +03:00
syntax Merge pull request #20624 from A4-Tacks/fix-syn-lifetime-bounds 2025-09-09 07:35:19 +00:00
syntax-bridge remove P 2025-08-09 15:47:01 +08:00
test-fixture Expand target info to include the architecture 2025-09-09 13:47:26 +03:00
test-utils Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics 2025-09-15 18:56:17 +03:00
toolchain Don't run doctests 2025-06-23 00:50:22 +03:00
tt cargo clippy --fix 2025-07-31 10:55:10 +02:00
vfs Bump salsa 2025-07-03 10:05:16 +02:00
vfs-notify cargo clippy --fix 2025-07-31 10:55:10 +02:00