Post #2227703
2025-11-19 07:38 UTC
I think it would be fine but the deprecation lint would have to start being enforced in next edition and I don't think .unwrap*() could be truly deprecated for the next few editions
@Mara@hachyderm.io
Replies (1)
-
@tdelmas@mamot.fr 2025-11-19 09:17
@pj@donotsta.re @Mara@hachyderm.io what about a lint that force every line that could panic to be preceded by a `// PANIC:` comment block, like the one for unsafe: https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks If they can panic. And if they can't: `#[expect(clippy::missing_panics_doc, reason = "infallible")]` https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc That way, any panic hidden in a function call should become visible.