dtolnay/no-panic
View on GitHub ↗ ★ 1,221 Rust
Attribute macro to require that the compiler prove a function can't ever panic
11 mentions on Hacker News by 9 people: 1 story, 10 comments · first 2021-02-19 · latest 2025-11-19
20082026
-
…leave something to be desired, so a first-party solution would probably be preferable. [0]: https://github.com/dtolnay/no-panic
comment by aw1621107 · 2025-11-19 · in Cloudflare outage on November 18, 2025 post mortem -
…for a "traditional" dynamically-typed language - Smalltalk, pre-type-hints Python, Lua, etc. [0]: https://github.com/dtolnay/no-panic
comment by aw1621107 · 2025-10-08 · in Should I choose Ada, SPARK, or Rust over C/C++? (2024) -
Normal rust can already do this. For example #[no_panic] attribute is implemented in https://github.com/dtolnay/no-panic crate.
comment by noxer · 2025-04-22 · in Verus: Verified Rust for low-level systems code -
…with a readable error message, if the optimizer isn't able to eliminate the check. edit: There is https://github.com/dtolnay/no-panic
comment by Yoric · 2025-02-04 · in No-Panic Rust: A Nice Technique for Systems Programming -
…IIRC this is being worked on, especially given Linus's position on panics in the kernel. [0]: https://github.com/dtolnay/no-panic
comment by aw1621107 · 2024-07-22 · in Jiff: Datetime library for Rust -
…panic), the program fails to compile with a linker error that identifies the function name. 1: https://github.com/dtolnay/no-panic
comment by marcus_cemes · 2022-11-13 · in Carefully exploring Rust as a Python developer -
…for, to ensure the correctness of stuff type errors can't catch. Now, there are some crates like https://github.com/dtolnay/no-panic or https://github.com/facebookexperimental/MIRAI that will check that your code is panic free. The first…
comment by nextaccountic · 2022-09-14 · in A pair of Linux kernel modules using Rust -
…to prevent them at compile time, and cannot be without major changes to the language (though see https://github.com/dtolnay/no-panic ).
comment by afdbcreid · 2022-04-07 · in Rust Lang Roadmap for 2024 -
…wait for an entire effect system, or be valuable enough to add to the compiler as a one-off? [0] https://github.com/dtolnay/no-panic
comment by yazaddaruvala · 2021-04-14 · in An RFC that adds support for Rust to the Linux kernel -
I found a crate that claims to do #1: https://github.com/dtolnay/no-panic This also looks interesting: https://github.com/Technolution/rustig
comment by johnsoft · 2021-02-19 · in Where Everything Went Wrong: Error Handling and Error Messages in Rust (2020)