We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
bug!
panic!
1 parent 718d28c commit fd76d23Copy full SHA for fd76d23
src/librustc_typeck/astconv.rs
@@ -489,7 +489,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
489
"lifetime" => ParamKindOrd::Lifetime,
490
"type" => ParamKindOrd::Type,
491
"constant" => ParamKindOrd::Const,
492
- _ => panic!(),
+ // It's more concise to match on the string representation, though it means
493
+ // the match is non-exhaustive.
494
+ _ => bug!("invalid generic parameter kind"),
495
};
496
let arg_ord = match arg {
497
GenericArg::Lifetime(_) => ParamKindOrd::Lifetime,
0 commit comments