File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/rustc_const_eval/src/const_eval
src/tools/clippy/clippy_utils/src Expand file tree Collapse file tree 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>(
8585}
8686
8787#[ 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 > (
8989 tcx : TyCtxt < ' tcx > ,
9090 val : ConstValue < ' tcx > ,
9191 ty : Ty < ' tcx > ,
Original file line number Diff line number Diff line change @@ -724,7 +724,7 @@ fn field_of_struct<'tcx>(
724724 field : & Ident ,
725725) -> Option < mir:: ConstantKind < ' tcx > > {
726726 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)
728728 && let Some ( dc_variant) = dc. variant
729729 && let Some ( variant) = adt_def. variants ( ) . get ( dc_variant)
730730 && 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