@@ -17,7 +17,9 @@ use rustc_hir::{BindingMode, ByRef};
17
17
use rustc_middle:: middle:: region;
18
18
use rustc_middle:: mir:: { self , * } ;
19
19
use 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
+ } ;
21
23
use rustc_middle:: { bug, span_bug} ;
22
24
use rustc_pattern_analysis:: rustc:: { DeconstructedPat , RustcPatCtxt } ;
23
25
use rustc_span:: { BytePos , Pos , Span , Symbol } ;
@@ -2885,6 +2887,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
2885
2887
ty:: ConstKind :: Value ( cv) => break ' a ( cv. valtree , cv. ty ) ,
2886
2888
other => span_bug ! ( constant. span, "{other:#?}" ) ,
2887
2889
} ,
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
+ }
2888
2893
// We should never encounter `Const::Val` unless MIR opts (like const prop) evaluate
2889
2894
// a constant and write that value back into `Operand`s. This could happen, but is
2890
2895
// unlikely. Also: all users of `simd_shuffle` are on unstable and already need to take
0 commit comments