@@ -17,7 +17,9 @@ use rustc_hir::{BindingMode, ByRef};
1717use rustc_middle:: middle:: region;
1818use rustc_middle:: mir:: { self , * } ;
1919use rustc_middle:: thir:: { self , * } ;
20- use rustc_middle:: ty:: { self , CanonicalUserTypeAnnotation , Ty , TypeVisitableExt , ValTreeKind } ;
20+ use rustc_middle:: ty:: {
21+ self , CanonicalUserTypeAnnotation , Ty , TypeVisitableExt , ValTree , ValTreeKind ,
22+ } ;
2123use rustc_middle:: { bug, span_bug} ;
2224use rustc_pattern_analysis:: rustc:: { DeconstructedPat , RustcPatCtxt } ;
2325use rustc_span:: { BytePos , Pos , Span , Symbol } ;
@@ -2885,6 +2887,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
28852887 ty:: ConstKind :: Value ( cv) => break ' a ( cv. valtree , cv. ty ) ,
28862888 other => span_bug ! ( constant. span, "{other:#?}" ) ,
28872889 } ,
2890+ mir:: Const :: Val ( mir:: ConstValue :: Scalar ( mir:: interpret:: Scalar :: Int ( val) ) , ty) => {
2891+ break ' a ( ValTree :: from_scalar_int ( self . tcx , val) , ty) ;
2892+ }
28882893 // We should never encounter `Const::Val` unless MIR opts (like const prop) evaluate
28892894 // a constant and write that value back into `Operand`s. This could happen, but is
28902895 // unlikely. Also: all users of `simd_shuffle` are on unstable and already need to take
0 commit comments