Commit 3540446
committed
Fix gen panics doc template for debug_assert
And add assert_eq, assert_ne, assert_matches support
Input:
```rust
pub fn $0foo(x: bool) {
debug_assert!(x);
}
```
Old:
```rust
/// .
///
/// # Panics
///
/// Panics if .
pub fn foo(x: bool) {
debug_assert!(x);
}
```
This PR fixes:
```rust
/// .
pub fn foo(x: bool) {
debug_assert!(x);
}
```1 parent d976ef8 commit 3540446
File tree
1 file changed
+62
-6
lines changed- src/tools/rust-analyzer/crates/ide-assists/src/handlers
1 file changed
+62
-6
lines changedLines changed: 62 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
322 | 338 | | |
323 | 339 | | |
324 | 340 | | |
| |||
677 | 693 | | |
678 | 694 | | |
679 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
680 | 714 | | |
681 | 715 | | |
682 | 716 | | |
| |||
699 | 733 | | |
700 | 734 | | |
701 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
702 | 758 | | |
703 | 759 | | |
704 | 760 | | |
| |||
0 commit comments