@@ -302,11 +302,11 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
302302 self . sanitize_place ( place, location, context) ;
303303 }
304304
305- fn visit_constant ( & mut self , constant : & Constant < ' tcx > , location : Location ) {
305+ fn visit_constant ( & mut self , constant : & ConstOperand < ' tcx > , location : Location ) {
306306 debug ! ( ?constant, ?location, "visit_constant" ) ;
307307
308308 self . super_constant ( constant, location) ;
309- let ty = self . sanitize_type ( constant, constant. literal . ty ( ) ) ;
309+ let ty = self . sanitize_type ( constant, constant. const_ . ty ( ) ) ;
310310
311311 self . cx . infcx . tcx . for_each_free_region ( & ty, |live_region| {
312312 let live_region_vid =
@@ -328,7 +328,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
328328
329329 if let Some ( annotation_index) = constant. user_ty {
330330 if let Err ( terr) = self . cx . relate_type_and_user_type (
331- constant. literal . ty ( ) ,
331+ constant. const_ . ty ( ) ,
332332 ty:: Variance :: Invariant ,
333333 & UserTypeProjection { base : annotation_index, projs : vec ! [ ] } ,
334334 locations,
@@ -340,20 +340,20 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
340340 constant,
341341 "bad constant user type {:?} vs {:?}: {:?}" ,
342342 annotation,
343- constant. literal . ty( ) ,
343+ constant. const_ . ty( ) ,
344344 terr,
345345 ) ;
346346 }
347347 } else {
348348 let tcx = self . tcx ( ) ;
349- let maybe_uneval = match constant. literal {
350- ConstantKind :: Ty ( ct) => match ct. kind ( ) {
349+ let maybe_uneval = match constant. const_ {
350+ Const :: Ty ( ct) => match ct. kind ( ) {
351351 ty:: ConstKind :: Unevaluated ( _) => {
352- bug ! ( "should not encounter unevaluated ConstantKind ::Ty here, got {:?}" , ct)
352+ bug ! ( "should not encounter unevaluated Const ::Ty here, got {:?}" , ct)
353353 }
354354 _ => None ,
355355 } ,
356- ConstantKind :: Unevaluated ( uv, _) => Some ( uv) ,
356+ Const :: Unevaluated ( uv, _) => Some ( uv) ,
357357 _ => None ,
358358 } ;
359359
@@ -384,15 +384,15 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
384384 check_err ( self , promoted_body, ty, promoted_ty) ;
385385 } else {
386386 self . cx . ascribe_user_type (
387- constant. literal . ty ( ) ,
387+ constant. const_ . ty ( ) ,
388388 UserType :: TypeOf ( uv. def , UserArgs { args : uv. args , user_self_ty : None } ) ,
389389 locations. span ( & self . cx . body ) ,
390390 ) ;
391391 }
392392 } else if let Some ( static_def_id) = constant. check_static_ptr ( tcx) {
393393 let unnormalized_ty = tcx. type_of ( static_def_id) . instantiate_identity ( ) ;
394394 let normalized_ty = self . cx . normalize ( unnormalized_ty, locations) ;
395- let literal_ty = constant. literal . ty ( ) . builtin_deref ( true ) . unwrap ( ) . ty ;
395+ let literal_ty = constant. const_ . ty ( ) . builtin_deref ( true ) . unwrap ( ) . ty ;
396396
397397 if let Err ( terr) = self . cx . eq_types (
398398 literal_ty,
@@ -404,7 +404,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
404404 }
405405 }
406406
407- if let ty:: FnDef ( def_id, args) = * constant. literal . ty ( ) . kind ( ) {
407+ if let ty:: FnDef ( def_id, args) = * constant. const_ . ty ( ) . kind ( ) {
408408 let instantiated_predicates = tcx. predicates_of ( def_id) . instantiate ( tcx, args) ;
409409 self . cx . normalize_and_prove_instantiated_predicates (
410410 def_id,
@@ -1801,9 +1801,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
18011801 debug ! ( ?op, ?location, "check_operand" ) ;
18021802
18031803 if let Operand :: Constant ( constant) = op {
1804- let maybe_uneval = match constant. literal {
1805- ConstantKind :: Val ( ..) | ConstantKind :: Ty ( _) => None ,
1806- ConstantKind :: Unevaluated ( uv, _) => Some ( uv) ,
1804+ let maybe_uneval = match constant. const_ {
1805+ Const :: Val ( ..) | Const :: Ty ( _) => None ,
1806+ Const :: Unevaluated ( uv, _) => Some ( uv) ,
18071807 } ;
18081808
18091809 if let Some ( uv) = maybe_uneval {
0 commit comments