diff --git a/compiler/rustc_mir/src/transform/check_consts/qualifs.rs b/compiler/rustc_mir/src/transform/check_consts/qualifs.rs index 3f4b3ca2eedb4..8f8815c1d3834 100644 --- a/compiler/rustc_mir/src/transform/check_consts/qualifs.rs +++ b/compiler/rustc_mir/src/transform/check_consts/qualifs.rs @@ -244,8 +244,11 @@ where }; // Check the qualifs of the value of `const` items. - if let ty::ConstKind::Unevaluated(def, _, promoted) = constant.literal.val { - assert!(promoted.is_none()); + if let ty::ConstKind::Unevaluated(def, _, _promoted) = constant.literal.val { + // FIXME(rust-lang/rust-clippy#6080): Const-checking should never see promoteds, but clippy + // is broken. + // assert!(promoted.is_none()); + // Don't peek inside trait associated constants. if cx.tcx.trait_of_item(def.did).is_none() { let qualifs = if let Some((did, param_did)) = def.as_const_arg() {