{"record":{"id":"0e046df14791b423","repo":"rust-lang/rust","slug":"fixme-comptime","errorCode":null,"errorMessage":"FIXME(comptime)","messagePattern":"FIXME\\(comptime\\)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler/rustc_middle/src/ty/adt.rs","lineNumber":315,"sourceCode":"            self.all_fields().map(move |field| tcx.type_of(field.did).skip_binder()),\n        )\n    }\n\n    fn sizedness_constraint(\n        self,\n        tcx: TyCtxt<'tcx>,\n        sizedness: ty::SizedTraitKind,\n    ) -> Option<ty::EarlyBinder<'tcx, Ty<'tcx>>> {\n        self.sizedness_constraint(tcx, sizedness)\n    }\n\n    fn is_fundamental(self) -> bool {\n        self.is_fundamental()\n    }\n\n    fn destructor(self, tcx: TyCtxt<'tcx>) -> Option<AdtDestructorKind> {\n        Some(match tcx.constness(self.destructor(tcx)?.did) {\n            hir::Constness::Const { always: true } => unimplemented!(\"FIXME(comptime)\"),\n            hir::Constness::Const { always: false } => AdtDestructorKind::Const,\n            hir::Constness::NotConst => AdtDestructorKind::NotConst,\n        })\n    }\n}\n\n#[derive(Copy, Clone, Debug, Eq, PartialEq, StableHash, TyEncodable, TyDecodable)]\npub enum AdtKind {\n    Struct,\n    Union,\n    Enum,\n}\n\nimpl From<AdtKind> for DataTypeKind {\n    fn from(val: AdtKind) -> Self {\n        match val {\n            AdtKind::Struct => DataTypeKind::Struct,\n            AdtKind::Union => DataTypeKind::Union,","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/compiler/rustc_middle/src/ty/adt.rs#L297-L333","documentation":"An `unimplemented!(\"FIXME(comptime)\")` ICE in `rustc_middle`'s ADT destructor classification (`AdtDef::destructor` wrapper). When a type's `Drop` impl is `Constness::Const { always: true }` (an always-evaluated const destructor — part of the in-progress comptime work), the destructor-kind query does not yet know how to classify it and panics at adt.rs:315.","triggerScenarios":"A type has a `Drop` impl marked `const` with the `always` flag set (comptime const-eval drop), and a query asks for the ADT's destructor kind. Triggered during drop-elaboration / const-destructuring passes.","commonSituations":"Using experimental const-destruct / comptime features that produce an `always: true` const destructor; not reachable from stable Rust. Seen on nightly with const-eval drop experiments.","solutions":["Remove the `const` modifier from the offending `Drop` impl so it is `NotConst` or a normal const destructor.","Disable the comptime/const-destruct experimental feature in the crate.","Track the upstream `FIXME(comptime)` work; upgrade nightly once implemented."],"exampleFix":"// before (always-const drop -> ICE)\nimpl const Drop for T { ... } // with always-const semantics\n\n// after — non-const drop\nimpl Drop for T { fn drop(&mut self) { ... } }","handlingStrategy":"validation","validationCode":"# Detect always-const Drop impls\nrg -nE 'impl\\s+const\\s+Drop' src/  # review whether 'always' semantics apply","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid `impl const Drop` with always-const semantics on nightly.","Prefer non-const `Drop` until the comptime FIXME is resolved.","Isolate experimental comptime drop behind a feature flag."],"tags":["rustc","adt","drop","const-eval","comptime","nightly","ice","compiler-internal","unfinished-feature"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}