Commit c5e6682
committed
Fix applicable on underscore for bind_unused_param
Fixes:
- applicable on underscore prefix parameter
- using binding mode as an expression
Examples
---
```rust
fn foo($0_x: i32, y: i32) {}
```
**Before this PR**:
```rust
fn foo(_x: i32, y: i32) {
let _ = _x;
}
```
**After this PR**:
Assist not applicable
---
```rust
fn foo(ref $0y: i32) {}
```
**Before this PR**:
```rust
fn foo(ref y: i32) {
let _ = ref y;
}
```
**After this PR**:
```rust
fn foo(ref y: i32) {
let _ = y;
}
```1 parent 45dda35 commit c5e6682
File tree
1 file changed
+30
-3
lines changed- src/tools/rust-analyzer/crates/ide-assists/src/handlers
1 file changed
+30
-3
lines changedLines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
86 | 103 | | |
87 | 104 | | |
88 | 105 | | |
| |||
149 | 166 | | |
150 | 167 | | |
151 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
152 | 179 | | |
153 | 180 | | |
154 | 181 | | |
| |||
0 commit comments