Open and answer this issue on GitHub.
ready · opened 2026-10-28 · updated 2026-10-28 · 0 comments
Seen in the probe of #918, on develop at 642b0d9.
enum Bad { Neg, Big }
impl Error for Bad { fn message(ref self) -> String { return "bad" } }
fn risky(n: i64) -> i64 throws {
if n < 0 { throw Bad::Neg }
return n
}
fn main() throws {
let v = risky(-1) catch { 0 }
println(f"{v}")
}
nikaia run shows rustc’s warning, with Rust’s vocabulary:
warning: Variant `Big` is never constructed.
--> f2.nika:1:1
= note: `Bad` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis.
derived impls, traits).mut never needed, unreachable code, an unused use, …). Write the list into this issue as a comment, with which of them Nikaia already says itself..nika span, in Nikaia’s words with a way out (C.2): a code per class from a block the supervisor reserves, the specification text and Part III’s code table written with it (a short ADR if a class needs a decision, e.g. what counts as used for a pub item or across a package).tests/compiler/tests/, .stderr): each class warned once, in Nikaia’s words, with no rustc text.