Commit ca262a3
committed
Automatically add semicolon when completing unit-returning functions
But provide a config to suppress that.
I didn't check whether we are in statement expression position, because this is hard in completion (due to the natural incompleteness of source code when completion is invoked), and anyway using function returning unit as an argument to something seems... dubious.1 parent f16a03f commit ca262a3
File tree
12 files changed
+217
-40
lines changed- src/tools/rust-analyzer
- crates
- ide-completion/src
- completions
- render
- tests
- rust-analyzer/src
- docs/user
- editors/code
12 files changed
+217
-40
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
| 603 | + | |
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
1188 | | - | |
| 1188 | + | |
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
1247 | | - | |
| 1247 | + | |
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
| |||
1331 | 1331 | | |
1332 | 1332 | | |
1333 | 1333 | | |
1334 | | - | |
| 1334 | + | |
1335 | 1335 | | |
1336 | 1336 | | |
1337 | 1337 | | |
| |||
1342 | 1342 | | |
1343 | 1343 | | |
1344 | 1344 | | |
1345 | | - | |
| 1345 | + | |
1346 | 1346 | | |
1347 | 1347 | | |
1348 | 1348 | | |
| |||
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | | - | |
| 1416 | + | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | | - | |
| 1543 | + | |
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
| |||
2789 | 2789 | | |
2790 | 2790 | | |
2791 | 2791 | | |
2792 | | - | |
| 2792 | + | |
2793 | 2793 | | |
2794 | 2794 | | |
2795 | 2795 | | |
| |||
2963 | 2963 | | |
2964 | 2964 | | |
2965 | 2965 | | |
2966 | | - | |
| 2966 | + | |
2967 | 2967 | | |
2968 | 2968 | | |
2969 | 2969 | | |
| |||
2990 | 2990 | | |
2991 | 2991 | | |
2992 | 2992 | | |
2993 | | - | |
| 2993 | + | |
2994 | 2994 | | |
2995 | 2995 | | |
2996 | 2996 | | |
| |||
0 commit comments