]> git.lizzy.rs Git - rust.git/commitdiff
Include kind in `bug!`
authorCamelid <37223377+camelid@users.noreply.github.com>
Mon, 1 Jun 2020 20:01:01 +0000 (13:01 -0700)
committerGitHub <noreply@github.com>
Mon, 1 Jun 2020 20:01:01 +0000 (13:01 -0700)
Co-authored-by: hafiz <20735482+ayazhafiz@users.noreply.github.com>
src/librustc_typeck/astconv.rs

index 7173ed3d24ec84d763b1985d4137a0880207788f..f1dc7e5390629a11f297d36f73ebe94b9bf5faa4 100644 (file)
@@ -491,7 +491,7 @@ fn generic_arg_mismatch_err(sess: &Session, arg: &GenericArg<'_>, kind: &'static
             "constant" => ParamKindOrd::Const,
             // It's more concise to match on the string representation, though it means
             // the match is non-exhaustive.
-            _ => bug!("invalid generic parameter kind"),
+            _ => bug!("invalid generic parameter kind {}", kind),
         };
         let arg_ord = match arg {
             GenericArg::Lifetime(_) => ParamKindOrd::Lifetime,