We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e907aa commit aae86ccCopy full SHA for aae86cc
clippy_utils/src/consts.rs
@@ -710,7 +710,7 @@ fn field_of_struct<'tcx>(
710
field: &Ident,
711
) -> Option<mir::Const<'tcx>> {
712
if let mir::Const::Val(result, ty) = result
713
- && let Some(dc) = lcx.tcx.try_destructure_mir_constant_for_diagnostics(result, ty)
+ && let Some(dc) = lcx.tcx.try_destructure_mir_constant_for_user_output(result, ty)
714
&& let Some(dc_variant) = dc.variant
715
&& let Some(variant) = adt_def.variants().get(dc_variant)
716
&& let Some(field_idx) = variant.fields.iter().position(|el| el.name == field.name)
0 commit comments