KEMBAR78
Fix gen panics doc template for debug_assert by A4-Tacks · Pull Request #20300 · rust-lang/rust-analyzer · GitHub
Skip to content

Conversation

@A4-Tacks
Copy link
Contributor

And add assert_eq, assert_ne, assert_matches support

Input:

pub fn $0foo(x: bool) {
    debug_assert!(x);
}

Old:

/// .
///
/// # Panics
///
/// Panics if .
pub fn foo(x: bool) {
    debug_assert!(x);
}

This PR fixes:

/// .
pub fn foo(x: bool) {
    debug_assert!(x);
}

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);
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 25, 2025
@ChayimFriedman2
Copy link
Contributor

Thanks!

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jul 29, 2025
Merged via the queue into rust-lang:master with commit 4f40768 Jul 29, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 29, 2025
@A4-Tacks A4-Tacks deleted the fix-debug_assert-doc-gen branch August 11, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants