Skip to main content

inspect_unhandled_message

Function inspect_unhandled_message 

Source
pub fn inspect_unhandled_message(type_name: &str, variant_name: &str) -> String
Expand description

The loud message for a non-exhaustive Inspect: no When arm matched the scrutinee’s ACTUAL variant and there was no Otherwise — gauntlet finding G5. Shared by the tree-walker and the VM so a mistyped arm (When Err (message): against a JsonResult, whose real variant is JErr) fails with the identical words wherever it runs, naming the value it actually got rather than the value-agnostic “the value” this message used to say before either tier could reach the runtime value that trapped it (current_site/Stmt::Site already gives both tiers the sentence’s own location on top of this, through the ordinary runtime-failure path — this message is only the “what”, not the “where”).