Skip to content
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

[panic_in_result_fn] Configure allowed panics #14056

Open
JP-Ellis opened this issue Jan 22, 2025 · 0 comments
Open

[panic_in_result_fn] Configure allowed panics #14056

JP-Ellis opened this issue Jan 22, 2025 · 0 comments

Comments

@JP-Ellis
Copy link

JP-Ellis commented Jan 22, 2025

Description

I personally like the brevity of ? in tests, which requires the test function to return a Result<...>.

At the same time, I also find the pretty_assertions crate particularly useful when verifying equality, despite them internally using panics.

It would be nice to complement/enhance the panic_in_result_fn lint by allowing for certain macros. For example in my case, specifically whitelisting the pretty_assertions::assert_* macros.

What are people's views on this?

Related

Version

rustc 1.84.0 (9fc6b4312 2025-01-07)
binary: rustc
commit-hash: 9fc6b43126469e3858e2fe86cafb4f0fd5068869
commit-date: 2025-01-07
host: aarch64-apple-darwin
release: 1.84.0
LLVM version: 19.1.5

Additional Labels

No response

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

No branches or pull requests

1 participant