Skip to content

Fix gen panics doc template for debug_assert #20300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2025

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