{"record":{"id":"9fcc25621ad865a6","repo":"rust-lang/rust","slug":"kind","errorCode":null,"errorMessage":"Kind: {:?}","messagePattern":"Kind: \\{:\\?\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler/rustc_codegen_gcc/src/int.rs","lineNumber":1064,"sourceCode":"fn type_kind_to_gcc_type<I: Interner>(kind: TyKind<I>) -> CType {\n    use rustc_middle::ty::IntTy::*;\n    use rustc_middle::ty::UintTy::*;\n    use rustc_middle::ty::{Int, Uint};\n\n    match kind {\n        Int(I8) => CType::Int8t,\n        Int(I16) => CType::Int16t,\n        Int(I32) => CType::Int32t,\n        Int(I64) => CType::Int64t,\n        Int(I128) => CType::Int128t,\n\n        Uint(U8) => CType::UInt8t,\n        Uint(U16) => CType::UInt16t,\n        Uint(U32) => CType::UInt32t,\n        Uint(U64) => CType::UInt64t,\n        Uint(U128) => CType::UInt128t,\n\n        _ => unimplemented!(\"Kind: {:?}\", kind),\n    }\n}\n","sourceCodeStart":1046,"sourceCodeEnd":1067,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/compiler/rustc_codegen_gcc/src/int.rs#L1046-L1067","documentation":"An `unimplemented!(\"Kind: {:?}\", kind)` ICE in rustc_codegen_gcc's `type_kind_to_gcc_type` helper. The function is meant to translate an integer-like `TyKind` into the matching fixed-width `CType`, but it only handles `Int(..)` and `Uint(..)` variants. Any other `TyKind` reaching it falls through to the panic. `type_kind_to_gcc_type` is called from `int.rs:323` while widening/truncating integer values, so a non-integer kind here is a compiler-internal invariant violation.","triggerScenarios":"The widening/narrowing path in the GCC backend receives a `TyKind` that is not `Int` or `Uint` — typically a type-inference bug, an unexpected `Bool`/`Char`, or an internal caller passing the wrong type kind into the integer-conversion helper. This is reached during codegen of integer cast/widen operations.","commonSituations":"Observed as an ICE during codegen with the GCC backend when a type that should be integer-typed is instead represented by another kind due to an upstream rustc bug or an incomplete cg_gcc call site. Not user-triggerable by normal Rust source; usually requires a malformed type or a cg_gcc regression.","solutions":["Report the ICE with `RUST_BACKTRACE=1` and the `kind` value printed in the message; this is most often a rustc/cg_gcc bug, not user code.","Reproduce with the LLVM backend to confirm the same source compiles; if LLVM succeeds, it is a cg_gcc-specific gap.","Update to a newer rustc/cg_gcc where the integer-kind handling has been extended, or locally extend the `match` to cover the missing kind if you control the build."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# This is an internal invariant ICE; validate by reproducing on LLVM first\n# If `rustc file.rs` (LLVM) succeeds but `rustc -Zcodegen-backend=gcc file.rs` ICEs,\n# report a cg_gcc bug with the printed `kind` value.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a known-good LLVM-backend build to bisect cg_gcc ICEs.","Capture `RUST_BACKTRACE=1` output; the printed `kind` identifies the missing match arm.","Track cg_gcc upstream; this is not preventable from user source."],"tags":["rustc","codegen-gcc","ice","compiler-internal","type-kind","invariant"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}