File tree 2 files changed +2
-2
lines changed
compiler/rustc_const_eval/src/const_eval
src/tools/clippy/clippy_utils/src
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ pub(crate) fn eval_to_valtree<'tcx>(
85
85
}
86
86
87
87
#[ instrument( skip( tcx) , level = "debug" ) ]
88
- pub ( crate ) fn try_destructure_mir_constant_for_diagnostics < ' tcx > (
88
+ pub fn try_destructure_mir_constant_for_diagnostics < ' tcx > (
89
89
tcx : TyCtxt < ' tcx > ,
90
90
val : ConstValue < ' tcx > ,
91
91
ty : Ty < ' tcx > ,
Original file line number Diff line number Diff line change @@ -724,7 +724,7 @@ fn field_of_struct<'tcx>(
724
724
field : & Ident ,
725
725
) -> Option < mir:: ConstantKind < ' tcx > > {
726
726
if let mir:: ConstantKind :: Val ( result, ty) = result
727
- && let Some ( dc) = lcx. tcx . try_destructure_mir_constant_for_diagnostics ( ( result, ty) )
727
+ && let Some ( dc) = rustc_const_eval :: const_eval :: try_destructure_mir_constant_for_diagnostics ( lcx. tcx , result, ty)
728
728
&& let Some ( dc_variant) = dc. variant
729
729
&& let Some ( variant) = adt_def. variants ( ) . get ( dc_variant)
730
730
&& let Some ( field_idx) = variant. fields . iter ( ) . position ( |el| el. name == field. name )
You can’t perform that action at this time.
0 commit comments