{"id":59098,"library":"no-panic","title":"no-panic","description":"Attribute macro to require that the compiler prove a function can't ever panic.","status":"active","version":"0.1.36","language":"rust","source_language":null,"source_url":"https://github.com/dtolnay/no-panic","tags":["no-panic","safety","compile-time","macro"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nno-panic = \"0.1.36\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add no-panic","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"no_panic","correct":"use no_panic::no_panic;"}],"quickstart":{"code":"use no_panic::no_panic;\n\n#[no_panic]\nfn safe_function(x: i32) -> i32 {\n    x + 1\n}\n\nfn main() {\n    println!(\"{}\", safe_function(5));\n}","lang":"rust","description":"Annotates a function to ensure it does not panic at compile time."},"warnings":[{"fix":"Replace panicking operations with safe alternatives (e.g., `get` instead of indexing).","message":"May fail to compile if the function uses any panicking operations (e.g., indexing, unwrap).","severity":"breaking","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'attribut':4 'compil':10,23 'compile-tim':22 'ever':16 'function':13 'macro':5,25 'no-pan':1,18 'panic':3,17,20 'prove':11 'requir':7 'safeti':21 'time':24","created_at":"2026-06-16T16:50:06.058540+00:00","updated_at":"2026-06-16T16:50:06.058540+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/dtolnay/no-panic","github":"https://github.com/dtolnay/no-panic","docs":"https://docs.rs/no-panic/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}